json - Trouble outputting Float value using Jackson library for Java -
when using jackson convert pojo string finding float values being truncated 5852402.63111111 becoming 5852402.6 when print out string. of values come e7 or number after them when cannot put value 8 digits. there must done printer or mapper set not truncate values. have been looking through documentation , have had no luck figuring 1 out. thanks!
currently method converting string is:
objectmapper mapper = new objectmapper(); mapper.enable(serializationfeature.indent_output); defaultprettyprinter printer = new defaultprettyprinter(); mapper.writer(printer).writevalueasstring(myobject);
Comments
Post a Comment