in reply to (OT) JSON - circular references allowed or not?
JSON serializes a tree, so no circular data structures out of the box.
Of course you can still establish circular data structures by convention and post-processing (for example give each objecht an __id__, and allow references like __ref__:$object_id).
One attempt to specify such a system is jsync, which uses the ideas from YAML, but stays with a JSON syntax.
(Note that JSON is not a serialization format, but rather a data exchange language, and thus is limited to a feature set available in nearly all programming languages).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (OT) JSON - circular references allowed or not?
by muba (Priest) on Sep 12, 2011 at 17:47 UTC |