Small improvements to JSON parser.
Small improvements to JSON parser.

- Don't allow garbage at the end of the JSON data (except whitespace).
- Don't allow objects such as {"a":"b",} or [a,]

jorisvink/kore,jorisvink/kore