Re: json

new topic     » goto parent     » topic index » view thread      » older message » newer message
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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu