[rabbitmq-discuss] Invalid JSON returned by RabbitMQ Management HTTP API
TrueWill
baldgoth at gmail.com
Fri Nov 18 19:20:42 GMT 2011
I guess I should have looked at the RFC. http://www.ietf.org/rfc/rfc4627
A JSON text is a serialized object or array.
>
> JSON-text = object / array
>
So never mind. Sorry to take up people's time.
On Friday, November 18, 2011 12:15:45 PM UTC-6, TrueWill wrote:
>
> Correction - JArray.Parse in Json.NET will parse it. I just have to use
> that rather than JObject.Parse when dealing with collections.
>
> On Friday, November 18, 2011 12:12:15 PM UTC-6, TrueWill wrote:
>>
>> Any particular reason the HTTP API returns raw JSON arrays rather than a
>> JSON object with an array field?
>>
>> Example:
>> /api/vhosts
>> [{"name":"/","tracing":false},{"name":"MyHost","tracing":false}]
>>
>> At least one library (Json.NET) fails to parse that. I'm not sure if it's
>> in the standard.
>>
>> A workaround is to create a JSON object on the client and assign this to
>> a field.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111118/54823cbd/attachment.htm>
More information about the rabbitmq-discuss
mailing list