FileDataJsonSerializer

Hi,



if i want to serialize documentinfos, some informations in the resulting json string are missing or wrong. i use the following command:



(new FileDataJsonSerializer(fileData, new FileDataOptions())).serialize()



the sourceobject and the resulting string are attached as Images!



Regards, Josef

Hi Josef,


Thanks for taking interest in GroupDocs.Viewer for Java.

Can you please tell us which version of the API you are using in your project ?

Kind Regards

Hi,

i use the latest Version 3.2.2

Regards, Josef

Hi Josef,


Thanks for answering.
We are able to reproduce this issue at our end, and the missing information you are talking about are only dates (document created and modified dates).
Hence, we have logged this issues in our internal issue tracking system. As we get any update from the concerned team, we will update you accordingly.

Best Wishes
Hi Josef,

The issue you reported will be fixed in any of our future releases. Until this issue is resolved, we would suggest you to use any other Java serialization/deserialization libraries that can convert Java Objects into JSON and back. You can use Gson and you may find this link helpful.

Serialization can be performed this way:
String data = gson.toJson(fileData);
try (FileWriter file = new FileWriter("D:/file.txt")) {
file.write(data.toString());
}
Please find the attached JSON output file and JSON view (screenshot) as well.

Have a nice weekend ahead.
Best Wishes

Hi Atir,



thanks for your reply! could you please verify the obfuscated fieldnames?



dateCreated: “ff”:“Sep 23, 2016 8:01:17 AM”

dateModified: “fh”:“Sep 26, 2016 12:45:20 PM”

pageCount"fi":1

pages"fj":[{

pageNumber"fy":1

angle: “fz”:0

width: “dh”:595,

height:“dj”:842,

rows:“fA”:[],

visible"fC":true}],

widthForMaxHeight:“fl”:595,

maxPageHeight: “fm”:842}

Hi Josef,


could you please verify the obfuscated fieldnames?
Yes, you mapped/related these fieldnames correctly.

Thanks