Example of converting XML to JSON in a Backbone/CoffeeScript using JATH
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
class OE.Offer extends Backbone.Model | |
class OE.Offers extends Backbone.Collection | |
model: OE.Offer | |
url: 'http://localhost:7000/offer/opportunities/merchant/123' | |
parse: (response) -> | |
template = ["//offer", { | |
id: 'id', | |
name: 'name', | |
code: 'code' | |
}] | |
Jath.parse(template, response) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment