0

I'm using a json-c library in Linux.

I have a JSON object :

jobj = {
    "person1": {
        "Id": 12354,
        "age": 12,
        "place": "someplace"
    },
    "person2": {
        "Id": 123,
        "age": 122,
        "place": "someplace"
    }
}

I want to store this data to a file and later I want to read json data from the same.

Please give some idea how to do it.

rastasheep
  • 10,416
  • 3
  • 27
  • 37
code_numb
  • 11
  • 4

1 Answers1

1

The answer is in the question:

  • you are using a json-c library for linux. There are quite a few available, notably libjson, json-c, jansson...
  • read the documentation for the one you selected
  • find an online tutorial
  • read sample code...

We cannot provide a precise answer for a completely open question.

chqrlie
  • 131,814
  • 10
  • 121
  • 189