jdereg / json-io

Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer. Deep copy Java object graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some source code suggestions

LongEth opened this issue · comments

Source code have many const String like: "@id","@keys","@Items","@type",etc., may be use some final static String to define them is a good purpose.

next code may be an error.

private void writeArray(final Object array, boolean showType) throws IOException
    {
........
 if (typeWritten || referenced)
        {
            output.write(shortMetaKeys ? "\"@i\":[" : "\"@items\":[");
        }
....
}

This has been fixed and test added. Will be publishing new json-io version within a day or so. I am looking through other issues to possibly include in this next release.