First little JSON output working
This commit is contained in:
parent
2165d10862
commit
b9b3d5477e
|
@ -1,9 +1,9 @@
|
||||||
(* cpdf command line tools *)
|
(* cpdf command line tools *)
|
||||||
let demo = false
|
let demo = false
|
||||||
let noncomp = true
|
let noncomp = false
|
||||||
let major_version = 2
|
let major_version = 2
|
||||||
let minor_version = 4
|
let minor_version = 4
|
||||||
let version_date = "(devel, 24th January 2020)"
|
let version_date = "(devel, 30th January 2020)"
|
||||||
|
|
||||||
open Pdfutil
|
open Pdfutil
|
||||||
open Pdfio
|
open Pdfio
|
||||||
|
|
|
@ -1 +1,12 @@
|
||||||
let write fh parse_content pdf = ()
|
module J = Tjjson
|
||||||
|
|
||||||
|
let test = J.Array [J.Number "100"; J.String "foo"]
|
||||||
|
|
||||||
|
let write fh parse_content pdf =
|
||||||
|
let b = Buffer.create 256 in
|
||||||
|
let formatter = Format.formatter_of_buffer b in
|
||||||
|
Tjjson.format formatter test;
|
||||||
|
Format.pp_print_flush formatter ();
|
||||||
|
output_string fh (Buffer.contents b)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue