--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/d493410e-6012-4947-b894-33e9f7d764c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/672218b2-1b13-4c02-b58e-7ab0f3834b24%40googlegroups.com.
new BigDecimal().toPlainString()
| public class J extends io.vertx.core.json.JsonObject { public J() { super(); } public J(Map<String, Object> map) { super(map); } public J(String json) { super(json); } @Override public io.vertx.core.json.JsonObject put(String key, Object value) { //Skipping any validation present in JsonObject getMap().put(key, value); return this; } } And use it. You will need to turn on BigDecimals/BigIntegers in mapper as usual. |
Is internet explorer still a thing? ;)
Ask developers around if they would risk money just because of "JavaScript" limitations, why would recommend any sane developer not to use BigDecimal on the server side? Because of some improbable theory?
Hence why people use BigDecimal. :D It doesn't have that problem.However, I do find myself that it has been easier to use ints as pennies and just move the decimal over two when I needed it to be in dollars.Mark
Hi everyone, lets try to transform this thread into something we can learn from, let just start by writing down what we would like to see in the JsonObject/JsonArray class definitions, it seems to be clear for everyone that BigDecimal should be allowed, so what is the expected behavior for decoding, also allow BigDecimal, try to match the smallest numerical type say 0.5 should it be parsed as a float, double, bigdecimal?