Hi, first, this looks like a GET request and isn't very readable, why not send the correctly formatted json ;) ?
Afaik Agavi has no generic JSON validator, so you should write a custom validator for that. I once wrote a generic json validator class, but this isn't tested and I found that most of the time, validating JSON is better done 'custom': https://git.icinga.org/?p=icinga-web.git;a=blob;f=app/modules/AppKit/lib/validator/AppKitJsonValidator.class.php;h=8c34990d96635035ca6e31642b0e78b470b299bc;hb=76386a0c05213097fef3861d9ee9e49867e20e67 Perhaps it helps. Regards, Jannis Am 20.02.2012 um 10:00 schrieb André Fiedler / ö_konzept Zwickau: > Hi Users :o) > > How do I validate suche a POST Request? > > Post Data (JSON String): > > http://foo.bar/api?%5B%7B%22action%22%3A%22Administration_UserApi%22%2C%22method%22%3A%22createRecord%22%2C%22data%22%3A%5B%7B%22id%22%3A0%2C%22username%22%3A%22l%5Cu00f6schmich%22%2C%22password%22%3A%22ergrege5%22%2C%22first_name%22%3A%22thtrhtrh%22%2C%22last_name%22%3A%22trhtrhtr%22%2C%22email%22%3A%22gtfegge%40gregf.de%22%2C%22birthday%22%3A%22%22%2C%22phone%22%3A%22%22%2C%22mobile_phone%22%3A%22%22%2C%22fax%22%3A%22%22%2C%22department%22%3A%22%22%2C%22title%22%3A%22%22%2C%22business_title%22%3A%22%22%2C%22salutation%22%3A%22Herr%22%2C%22description%22%3A%22%22%2C%22roles%22%3A%5B%7B%22role%22%3A%22editor%22%2C%22name%22%3A%22Mitarbeiter%22%2C%22credentials%22%3A%7B%22app.launch%22%3A%22Anwendung%20starten%22%7D%7D%5D%2C%22last_login%22%3A%22%22%2C%22is_locked%22%3Afalse%7D%5D%2C%22type%22%3A%22rpc%22%2C%22tid%22%3A5%7D%2C%7B%22action%22%3A%22Administration_UserApi%22%2C%22method%22%3A%22getRecords%22%2C%22data%22%3A%5B%7B%22page%22%3A1%2C%22start%22%3A0%2C%22limit%22%3A25%7D%5D%2C%22type%22%3A%22rpc%22%2C%22tid%22%3A6%7D%5D= > _______________________________________________ > users mailing list > [email protected] > http://lists.agavi.org/mailman/listinfo/users -- Jannis Moßhammer Software Developer NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nürnberg Tel: +49 911 92885-0 | Fax: +49 911 92885-77 GF: Julian Hein, Bernd Erk | AG Nürnberg HRB18461 http://www.netways.de | [email protected]
_______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
