ibireme / yyjson

The fastest JSON library in C
https://ibireme.github.io/yyjson/doc/doxygen/html/
MIT License
3.07k stars 267 forks source link

I need to merge multiple JSON strings #162

Closed car520120 closed 7 months ago

car520120 commented 7 months ago

The file content to be read is as follows:

*12
{
    "A": 1
    "B": "123"
}

*12
{
    "A": 1
    "B": "abc"
}

I need to read the content in the file and synthesize it as follows:

{
    "# flush_time": "2024-03-08 14:27:12.269",
    "Data":[
          {
              "A": 1
              "B": "123"
          },
          {
              "A": 1
              "B": "abc"
          }
    ]
}
car520120 commented 7 months ago

yyjson_mut_rawcpy is ok!