Re: json
- Posted by mattlewis (admin) Aug 01, 2012
- 2984 views
bugmagnet said...
With that in mind, can maps be embedded in maps? How do you tell, when traversing a sequence, whether the next embedded sequence is a map or not?
Maps are not actually sequences. They are atoms, which are essentially pointers into a sequence (where the actual map data is stored inside a sequence). You can use explicit type checking to determine if you are dealing with a map. In theory, it's possible to get a false positive, but unlikely.
For easy embedding, see nested_put() and nested_get().
Matt