GithubHelp home page GithubHelp logo

json-simple's Introduction

json-simple's People

Contributors

jchambers avatar fangyidong avatar dlh3 avatar

Watchers

James Cloos avatar  avatar

json-simple's Issues

org.json.simple.parser.ParseException should override get[Localized]Message

What steps will reproduce the problem?
1. capture a org.json.simple.parser.ParseException
2. use the 'getMessage' or 'getLocalizedMessage' API
3. returns NULL (when there is a message returned by toString)

What is the expected output? What do you see instead?
Should be the same as the 'toString()' method; or at least comparable useful.

What version of the product are you using? On what operating system?
1.1

Please provide any additional information below.
Right now the ParseException's 'toString' method is overridden. Which
leaves the get[Localized]Message APIs doing nothing. The override should
be in the get[Localized]Message and the inherited toString will work
fine. This will cover all three methods...

Original issue reported on code.google.com by [email protected] on 9 May 2009 at 10:50

Object[] not serializable

What steps will reproduce the problem?

Create a Object[] and then try to transform to a JSON string.
In example: org.json.simple.JSONValue.toJSONString(new Object[] {"1"})


What is the expected output? What do you see instead?

The output should be like the java.util.List's output. I.e.: ["1"]
The call returns a "toString()" output. I.e.: [Ljava.lang.Object;@2ad191


What version of the product are you using? On what operating system?

json_simple-1.1.jar


Please provide any additional information below.


Original issue reported on code.google.com by atec.post on 19 Feb 2009 at 12:51

Issue when parsing

Hi when I run the following
        jsonData = NetUtils.getHTTPFile("http://www.iobridge.com/api/feed/key=" + feedKey);
        JSONParser parser = new JSONParser();
        Object obj = null;
            //parse the JSON data
        try {
               obj = parser.parse(jsonData);
        } catch (ParseException e) {}
              JSONArray array=(JSONArray)obj;
              System.out.println(array.get(1));
              JSONObject obj2=(JSONObject)array.get(1);
              System.out.println(obj2.get("1"));

I get the following Exception
Exception in thread "main" java.lang.ClassCastException: 
org.json.simple.JSONObject
        at IOB.IOBModule.<init>(IOBModule.java:33)
        at myroomcontrol.Main.main(Main.java:30)
Java Result: 1

Original issue reported on code.google.com by [email protected] on 17 Feb 2009 at 9:31

putting a Date into a JSONObject

What steps will reproduce the problem?
1. putting a Date-object into a JSONObject

What is the expected output? What do you see instead?
I expected a String representation of that Date, but I get it without
quotes, so the JSON is not valid.


What version of the product are you using? On what operating system?
version 1.1 of json-simple


To fix it, I have to "convert" the date by toString().

Original issue reported on code.google.com by [email protected] on 20 Apr 2009 at 1:33

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.