JSON output? #4
Labels
No labels
dependencies
javascript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
quodatum/basex-node#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi Andy,
Quick question: How can I set the serialization options so that I get JSON instead of xml in the return?
http://docs.basex.org/wiki/Serialization
Thanks!
Currently basex-node has no special handling for JSON. It would be a useful addition.
However..
If you set a json type serialization using one of the provided methods "json" or "jsonml" http://docs.basex.org/wiki/Serialization
The basex-node
reply.result, which is always a string, can be parsed viaJSON.parseHere is an example
json.jsfile created in the examples folderResult from
node json.jsUsing SERIALIZER
Ah great. Thanks!