Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigDecimal serialization is not supported #49

Closed
GoogleCodeExporter opened this issue Sep 10, 2015 · 6 comments
Closed

BigDecimal serialization is not supported #49

GoogleCodeExporter opened this issue Sep 10, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. BigDecimal serialization is not supported
2.
3.

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

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

Please provide any additional information below.
BigDecimal.class should be added to registerWriter as part of Number writer 
registration in init function of JsonWriter class.

Original issue reported on code.google.com by david.dk...@gmail.com on 22 Oct 2014 at 8:55

@GoogleCodeExporter
Copy link
Author

please provide a full example with javacode.

Original comment by uriel.chemouni on 5 Nov 2014 at 11:09

@GoogleCodeExporter
Copy link
Author

I have added this code in my java class:

// fix json smart missing BigDecimal serializer
JSONValue.defaultWriter.registerWriter(new JsonWriterI<BigDecimal>() {
    public void writeJSONString(BigDecimal value, Appendable out, JSONStyle compression) throws IOException {
    out.append(value.toString());
    }
}, BigDecimal.class);

Original comment by david.dk...@gmail.com on 5 Nov 2014 at 1:03

@GoogleCodeExporter
Copy link
Author

Fixed.

Original comment by uriel.chemouni on 11 Mar 2015 at 9:04

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

it looks like the modification is already in the git repo 
(https://github.com/netplex/json-smart-v2/blob/master/json-smart/src/main/java/n
et/minidev/json/reader/JsonWriter.java#L211) but it is not in 2.1.1 jar from 
maven central (even if the pom version in git is 2.1.1).

Is it because you do not use SNAPSHOT versions in your trunk/master branch?

Original comment by brouilla...@gmail.com on 31 Mar 2015 at 9:42

@GoogleCodeExporter
Copy link
Author

I am using 1.3.1 release that I have downloaded from maven.

Original comment by david.dk...@gmail.com on 31 Mar 2015 at 1:17

@GoogleCodeExporter
Copy link
Author

Original comment by uriel.chemouni on 20 Aug 2015 at 7:16

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant