login about faq

Just curious how i load json string that starts as array [ ie

At the moment i cheat a bit and prefix the string it with { "array": and post fix with } and then use jsonobject.load(string) It works, but i assume there is a correct way?

asked Jun 16 '16 at 08:21

chilkat's gravatar image

chilkat ♦♦

Your cheat is likely the best solution. A JSON object must begin with "{". See http://www.json.org/

An array is just one particular kind of value:

object {} { members } members pair pair , members pair string : value array [] [ elements ] elements value value , elements value string number object array true false null


answered Jun 16 '16 at 08:24

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 16 '16 at 08:21

Seen: 2,214 times

Last updated: Jun 16 '16 at 08:24

powered by OSQA