static void Main(string[] args) { var obj = new HADocsOpenDataMain(1); string json = JsonNetSerDeser.Serialize(obj, @"R:\HADocsOpenDataBatchSample.json"); //var obj = JsonNetSerDeser.Deserialize(@"R:\HADocsOpenDataBatchSample.json"); PdfManipulation.AddMetadataToExistingPdfFile(@"R:\2013.pdf", json); string readJson = PdfManipulation.ReadJsonFromPdf(@"R:\2013.pdfoutput.pdf"); bool equal = json.Equals(readJson); }
public static string Serialize(HADocsOpenDataMain data, string filename) { string json = JsonConvert.SerializeObject(data, TypicalSettings); File.WriteAllText(filename, json); return json; //for testing/development purposes }