Skip to content

Instantly share code, notes, and snippets.

@hassox
Created July 30, 2008 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassox/50db7e32776f4c7f8b10 to your computer and use it in GitHub Desktop.
Save hassox/50db7e32776f4c7f8b10 to your computer and use it in GitHub Desktop.
{
description: "Some Descritption",
resource: "users",
path: "/users",
fields: [ {id : "Integer"}, {name : "String"}, { phone_number : "String"} ],
methods: [ "GET", "DELETE", "PUT", "POST", "OPTIONS" ]
}
{:people => [
{:name => "Yehuda", :age => 26, :siblings => ["Avrohom", "Yaakov", "Nechama"]}
])
JSON:
{people: [
{name: "Yehuda", age: 26, siblings: ["Avrohom", "Yaakov", "Nechama"]
]}
XML:
<struct>
<list name="people">
<struct>
<string name="name">Yehuda</string>
<i4 name="age">26</i4>
<list name="siblings">
<string>Avrohom</string>
<string>Yaakov</string>
<string>Nechama</string>
</list>
</struct>
</list>
</struct>
{:name => "Yehuda", :age => 26, :siblings => ["Avrohom", "Yaakov", "Nechama"]}
JSON:
{name: "Yehuda", age: 26, siblings: ["Avrohom", "Yaakov", "Nechama"]}
XML:
<struct>
<string name="name">Yehuda</string>
<i4 name="age">26</i4>
<list name="siblings">
<string>Avrohom</string>
<string>Yaakov</string>
<string>Nechama</string>
</list>
</struct>
{
resources: [
{
description: "Some Descritption",
resource: "users",
path: "/users",
fields: [ {id : "Integer"}, {name : "String"}, { phone_number : "String"} ],
methods: [ "GET", "DELETE", "PUT", "POST", "OPTIONS" ]
},
{
description: "Some Descritption",
resource: "comments",
path: "/comments"
fields: [ {id : "Integer"}, {name : "String"}, { body : "String"}, {owner_id : "Integer"} ],
methods: [ "GET", "DELETE", "PUT", "POST", "OPTIONS" ]
},
{
description: "Some Descritption",
resource: "posts",
path: "/posts",
fields: [ {id : "Integer"}, {title : "String"}, { body : "String"}, {owner_id : "Integer"} ],
methods: [ "GET", "DELETE", "POST", "OPTIONS" ]
}
]}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment