Last active
August 29, 2015 14:00
-
-
Save gmodarelli/11179337 to your computer and use it in GitHub Desktop.
XML2JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"link": { | |
"_attributes": { | |
"href": "http://gmodarelli.com", | |
"rel": "self" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<link href="http://gmodarelli.com" rel="self" /> | |
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"link": { | |
"_attributes": { | |
"href": "http://www.andreadippolito.it", | |
"rel": "self" | |
}, | |
"_text": "wearemonk.com" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<link href="http://www.wearemonk.com" rel="self">wearemonk.com</link> | |
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XML2JSON.config do |c| | |
c.attributes_key = "my_attributes" | |
c.namespaces_key = "my_namespaces" | |
c.text_key = "my_text" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'xml2json', git: 'git@github.com:monksoftware/xml2json.git' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"_namespaces": { | |
"xmlns": "http://some.namespace.definition" | |
}, | |
"link": { | |
"_attributes": { | |
"href": "http://www.andreadippolito.it", | |
"rel": "self" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root xmlns:"http://some.namespace.definition"> | |
<link href="http://www.andreadippolito.it" rel="self" /> | |
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"root": { | |
"authors": [ | |
{ | |
"name": "Giuseppe Modarelli" | |
}, | |
{ | |
"name": "Andrea D'Ippolito" | |
} | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<root> | |
<author> | |
<name>Giuseppe Modarelli</name> | |
</author> | |
<author> | |
<name>Andrea D'Ippolito</name> | |
</author> | |
</root> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment