users@jersey.java.net

[Jersey] Re: Multi Dimensional json Arrays

From: Justin Knotzke <jknotzke_at_shampoo.ca>
Date: Fri, 16 Sep 2011 11:22:20 -0400

   Hi

  Maybe I can clarify here:

 https://strava.pbworks.com/w/page/39241255/v2%20upload%20create

  This is the service I am trying to use.

  Are you suggesting this is an invalid json ?

  J




On Fri, Sep 16, 2011 at 10:26, Jakub Podlesak <jakub.podlesak_at_oracle.com>wrote:

> **
> Hi Justin,
>
> please see inline...
>
>
> On 16.9.2011 4:12, Justin Knotzke wrote:
>
>
> Hi
>
> I am trying to produce a json post request to a REST service. The post
> request must have the following format:
>
> Sample Request:
>
> {
>
> "id": "2008-06-16T13:36:35Z",
>
> "type": "json",
>
> "data_fields": ["time", "latitude", "longitude", "elevation",
> "h_accuracy", "v_accuracy"]
>
> the only possible symbols here are: , or }
>
>
> "data": [
>
> ["2011-04-19T16:09:03-07:00", 37.7020145393908, -122.496896423399,
> 109, 10, 10],
>
> ["2011-04-19T16:09:14-07:00", 37.7020145393908, -122.496896423399,
> 109, 10, 10],
>
> ["2011-04-19T16:09:24-07:00", 37.7020145393908, -122.496896423399,
> 109, 10, 10]
>
> ]
>
>
> the only 2 dimensional array i can see above (called "data").
>
> }
>
>
> Please note that this is a 2 dimensional array (no comma after
> "v_accuracy"]. How do I do this using jersey ?
>
> I am able to produce a 1 dimensional array but the service requires
> that this be 2 dimensional.
>
>
> I am afraid i do not quite understand the question. If you insist the comma
> should be missing,
> then you ask an invalid JSON, not a 2 dimensional array.
>
> Could you please clarify?
>
> Thanks,
>
> ~Jakub
>
>
> Any ideas ?
>
> Thanks
>
> J
>
>
>
>
>
>