First little JSON output working

This commit is contained in:
John Whitington 2020-01-30 10:42:24 +00:00
parent 2165d10862
commit b9b3d5477e
2 changed files with 14 additions and 3 deletions

View File

@ -1,9 +1,9 @@
(* cpdf command line tools *)
let demo = false
let noncomp = true
let noncomp = false
let major_version = 2
let minor_version = 4
let version_date = "(devel, 24th January 2020)"
let version_date = "(devel, 30th January 2020)"
open Pdfutil
open Pdfio

View File

@ -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)