XmlJson.BadgerFish (XmlJson v0.1.0) View Source
The BadgerFish implementation of XML <=> JSON
Link to this section Summary
Link to this section Functions
Deserializes the given XML string.
Returns an :ok
tuple with the XML deserialized to a Map
Examples
iex> XmlJson.BadgerFish.deserialize("<alice>bob</alice>")
{:ok, %{"alice" => %{"$" => "bob"}}}
Serializes the given Map.
Returns an :ok
tuple with the Map serialized to XML
Examples
iex> XmlJson.BadgerFish.serialize(%{"alice" => %{"$" => "bob"}})
{:ok, "<alice>bob</alice>"}