My question is similar to LINK I have a file that contains tons of JSON objects. I would like to parse the objects from my textfile into a list in my program.
Below is an example of the JSON object contained in the file:
{
"cars":toyota,
{
"type":"sedan",
"year": 2010
}
"color": "Black"
}
{
"cars":Ford,
"type":"sedan",
"color": "Black"
}
{
"cars":Honda,
"type":"sedan",
"color": "Black"
}
These json objects are not seperated with commas and span multiple lines making it hard to parse all of them. Some of these objects also contain multiple object embedded in them. I attempted to use GSON to parse the file but it doesn't seem to be working.