Skip to content

Why is there @foo and $ keys in JSON ? #1

@Magador

Description

@Magador

It is known as the BadgerFish convention used to represent XML documents into JSON.

the @ sign before any key is used to indicate a property of the element as the $ represent the value of the element:

<alice charlie="David">
    Bob
</alice>

convert into:

{  
   "alice":{  
      "$":"Bob",
      "@charlie":"David"
   }
}

More infos on BADGERFISH

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions