josephalevin / fson

Fortran 95 JSON Parser
60 stars 25 forks source link

create a json object #18

Closed nikhil003 closed 5 years ago

nikhil003 commented 9 years ago

Hi,

I wanted to know if FSON can create a JSON object, i know that json-fortran can create a json object i.e. make a json file from scratch, which can be then saved as a json file. I am curious as Fson is said to be parser.

josephalevin commented 9 years ago

Are you asking if FSON can write an in memory data structure to a json file on disk?

nikhil003 commented 9 years ago

Well yes and no...i am actually asking if FSON can create a data structure i.e. if i have fortran array and strings etc and i want to make a json type data structure using FSON. I can do it in json-fortran but then it restricts me to use newer version of gcc which is a limitation on my system.

I am trying to explore if FSON can do that. I am right now exploring FSON code to find this out on myself.

paulequilibrio commented 5 years ago

Are you asking if FSON can write an in memory data structure to a json file on disk?

This is possible? If yes, could you provide some example?

acroucher commented 5 years ago

No, it isn't possible with FSON. If you need to do that, I would recommend using JSON-Fortran instead.