The JSON string itself was indeed not quite correct.
- There was a missing
\
in one of the strings, so one quotationmark was not properly masked:"autores" : ",\"string\",\"string\",\"string\",\"string",5"
should be"autores" : ",\"string\",\"string\",\"string\",\"string\",5"
- The individual
{}
objects (line 1 and 2, as you call them) must be combined in an upper structure, either an array ([]
) or an object ({}
with identifiers) since otherwise it is not clearly defined, how the JSON structure is to be interpreted.
I modified your JSON string to be composed of two array elements, each one containing a line (=one JSON object):
[{ "_id" : { "$oid" : "string" },
"titulo" : "string",
"id_cv" : 1132,
"textos" : [ { "fecha" : { "$date" : 1217376000000 },
"estado" : "string",
"texto" : "string",
"source_url" : "string" } ] },
{ "_id" : { "$oid" : "string" },
"titulo" : "string",
"autores" : ",\"string\",\"string\",\"string\",\"string\",5",
"id_cv" : 1138,
"textos" : [ { "fecha" : { "$date" : 1217548800000 },
"estado" : "string",
"texto" : "string",
"source_url" : "string" } ] }]
I added newlines for better readability. newline characters and whitespace (outside individual identifiers or strings) are - or better: should be - ignored by JSON parsers.