Hi,
I‘m confused by the way TBX deals with JSON data.
I receive this JSON from a server:
[{"wp_post_id":649,"title":"Ich bin ein Test aus TBX","content":"# Test mit Anf\\u00fchrungszeichen und mehr\\r\\n\\r\\nDies ist ein Test mit:\\r\\n- Doppelten Anf\\u00fchrungszeichen: \\"Das ist ein Zitat\\"\\r\\n- Einfachen Anf\\u00fchrungszeichen: \\"Ein anderes Zitat\\"\\r\\n- Schr\\u00e4gstrich: C:UsersDetlefDateien\\r\\n\\r\\nCode-Beispiel:\\r\\n\`\`\`javascript\\r\\nvar text = \\"Hello \\"World\\"\\";\\r\\nconsole.log(\\u00b4Das ist ein Test\\u00b4);\\r\\n\`\`\`\\r\\n\\r\\nUnd ein echtes Zitat:\\r\\n> \\u201eDies ist ein deutsches Zitat mit Guillemets.\\"","post_status":"publish","sync_id":"0340acb1-62b3-4620-893f-8e5f7f019e70","sync_version":1,"sync_status":"pending_tb","source":"tinderbox","last_modified_openclaw":"","last_modified_tinderbox":"2026-04-06 18:07:23","last_updated":"2026-04-06 18:07:23","deleted_by_openclaw":false,"deleted_by_tinderbox":false,"tinderbox_meta":"","category":"allgemein","related_notes":\[\]}\]
[Admin edit, added code mark-up above to help spot forum changing quote type]
I already remove single quotes since they break the JSON methods in TBX. Here I see a valid JSON payload. Let’s store the JSON in a string variable “theList”. JSON uses “,” to separate elements, TBX uses “;”.
Now with theList.json[0] I can access to first element in the list - TBX sees the content as valid JSON object. But the result is no valid JSON anymore since TBX seems to “unescape” the string:
theList.json[0]:
{ category:“allgemein”;content:"# Test mit Anführungszeichen und mehr
Dies ist ein Test mit:
Doppelten Anführungszeichen: “Das ist ein Zitat”
Einfachen Anführungszeichen: “Ein anderes Zitat”
Schrägstrich: C:UsersDetlefDateien
Code-Beispiel:
var text = "Hello "World"";
console.log(´Das ist ein Test´);
Und ein echtes Zitat:
> „Dies ist ein deutsches Zitat mit Guillemets.“”;deleted_by_openclaw:false;deleted_by_tinderbox:false;last_modified_openclaw:“”;last_modified_tinderbox:“2026-04-06 18:07:23”;last_updated:“2026-04-06 18:07:23”;post_status:“publish”;related_notes:[ ];source:“tinderbox”;sync_id:“0340acb1-62b3-4620-893f-8e5f7f019e70”;sync_status:“pending_tb”;sync_version:1;tinderbox_meta:“”;title:“Ich bin ein Test aus TBX”;wp_post_id:649 }
Now the JSON is broken - the double quotes break the structure.
I also tried to get the object out of the JSON string - remove the brackets around the string:
truncList = theList.substr(1,theList.size-2);
When I pass the shortened string as a JSON Object like in truncList.json it is empty - so for TBX this is no valid JSON Object - but it is.
So far I found no way to transform the JSON into a valid TBX dictionary. Any idea?
