jax rs - Jax-rs with Jersey : different Json stream. Why ? -


i have 2 test machines, 1 (lets call workstation a) java 1.6 , netbeans 7.2, other (workstation b) java 1.7 , netbeans 7.3. check jersey libraries , release numbers different. created simple web service using netbeans wizard "restful webservices database" on workstation a , produces json this:

{"somename":[{"id":"2","nome":"1 maggio"}, ..., {"id":"6","nome":"25 dicembre"}]} 

as can see json object single name value pair value array of objects.

doing same operations on workstation b get:

[{"id":"2","nome":"1 maggio"}, ..., {"id":"6","nome":"25 dicembre"}] 

this simple json array, not json object workstation a. may inadvertently put different in web service configuration on 2 machines, have no idea check.

i suspect different result depends on different version of jersey , java sdk. can confirm on ? have write client web service need consistent output.

thanks filippo


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -