When using JSON as the output format in ditto, is there a way to prevent it breaking the content field into multiple lines? If I use javascript eval() on the output, it errors saying "Unterminated string constant". But if I remove the linebreaks, it gets evaled ok.
So to make it perfectly clear, currently it outputs this (what is not evaling):
{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[ { "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"
More content here
", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" }, { "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"
Content here
", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }
and when changed to this, it evals ok:
{ "title":"test", "link":"http://localhost:8080/eclipse/modx/index.php?id=39", "description":"", "language":"english", "copyright":"My MODx Site 2006", "copyright":"My MODx Site 2006", "ttl":"120", "entries":[
{ "title":"Another title", "link":"http://localhost:8080/eclipse/modx/index.php?id=42", "description":"61.438767,23.730469", "content":"More content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=42", "author":"Built-in Administration account" },
{ "title":"Some title", "link":"http://localhost:8080/eclipse/modx/index.php?id=41", "description":"60.239811,25.048828", "content":"Content here", "pubDate":"06", "guid":"http://localhost:8080/eclipse/modx/index.php?id=41", "author":"Built-in Administration account" } ] }
The contents of "content" field to json comes from [+summary+] placeholder.
Btw. json is missing from the documentation as possible value to &format parameter..
EDIT: also, is there a reason why copyright is twice at the first block?