Created
January 9, 2012 20:22
-
-
Save jdsampayo/1584749 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Rails me la da asi: | |
[ | |
{ "title": "RestKit Object Mapping Intro", | |
"body": "This article details how to use RestKit object mapping...", | |
"author": "Blake Watters", | |
"publication_date": "7/4/2011" | |
}, | |
{ "title": "RestKit 1.0 Released", | |
"body": "RestKit 1.0 has been released to much fanfare across the galaxy...", | |
"author": "Blake Watters", | |
"publication_date": "9/4/2011" | |
} | |
] | |
con el ActiveResource::Base.include_root_in_json = true | |
[ | |
"article": { "title": "RestKit Object Mapping Intro", | |
"body": "This article details how to use RestKit object mapping...", | |
"author": "Blake Watters", | |
"publication_date": "7/4/2011" | |
}, | |
"article": { "title": "RestKit 1.0 Released", | |
"body": "RestKit 1.0 has been released to much fanfare across the galaxy...", | |
"author": "Blake Watters", | |
"publication_date": "9/4/2011" | |
} | |
] | |
pero lo necesito asi: | |
{ "articles": [ | |
{ "title": "RestKit Object Mapping Intro", | |
"body": "This article details how to use RestKit object mapping...", | |
"author": "Blake Watters", | |
"publication_date": "7/4/2011" | |
}, | |
{ "title": "RestKit 1.0 Released", | |
"body": "RestKit 1.0 has been released to much fanfare across the galaxy...", | |
"author": "Blake Watters", | |
"publication_date": "9/4/2011" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment