Reputation: 11
as above a title
i use the lift ( scala ) with jetty web server
i wanted to develop rest api . as fast as possible.
so i extended crudify ( trait )
finally , i can get results that are html web pages
now..
i want to get form that is json or xml format
i don't need html code.
i just want format of json or xml.
how can i modify this source code extending crudify
may be . i think that overriding some functions of crudify.
thanks in advance
Upvotes: 1
Views: 291
Reputation: 3185
Like the answer above CRUDify is for HTML not for JSON nor XML. To represent your mapper object as a xml or json use: toXml and asJs functions. The other way you have to add parse functions that convert values posted by user into mapper objects.
Upvotes: 0
Reputation: 42047
Crudify is not the right solution for a REST API. You should have a look at the REST Web Services page in the Lift wiki. To create XML documents automatically, maybe you should have a look at JAXB.
Upvotes: 2