[Recherche] Serialisation d'objets pour requêtes HTTP
Bonjour,
Je suis à la recherche d'une éventuelle API permettant de serializer un bean en paramètres pour des requêtes HTTP (simplement en GET serais déjaà super).
Ce que je cherche pourrais me donner un truc du style
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
char sex = 'M';
int age = 99;
Nationality nat = new Nationality("FRA", "Française");
Person person = new Person()
person.setName("Jean");
person.setLastName("Dupond");
person.setNationality(nat);
person.setSex(sex);
person.setAge(age);
xx.yy.HttpSerializer httpSer = new xx.yy.HttpSerializer();
String httpQuery = httpSer.serialize(person);
/* httpQuery contient :
name=Jean&lastName=Dupond&nationality.code=FRA&nationality.libelle=Française&sex=M&age=99 */ |
L'un d'entre vous connaitrai t'il une API de ce genre ?
Merci