While getting a JSON response from my restful service implemented in JAVA, I am observing that the long data type values ending with 01 are rounded off to 00. For example:
the long values,
12345123459876501 is returned as 12345123459876500 (last digit rounded to 0)
12345123459876502 is returned as 12345123459876502
12345123451234501 is returned as 12345123451234500 (last digit rounded to 0)
12345123451234502 is returned as 12345123451234502
Could anybody help me understand why only the values ending with 01 are getting rounded to 00?
ResponseBuilder responseBuilder = Response.status(ResponseStatus.SUCCESS.getHttpStatus());
responseBuilder.entity(entity);
return responseBuilder.build();
The entity is an object which has the long value as one of the element – BalajiBabu Apr 09 '14 at 16:54
ResponseBuilder responseBuilder = Response.status(ResponseStatus.SUCCESS.getHttpStatus()); responseBuilder.entity(entity); return responseBuilder.build();
The entity is an object which has the long value as one of the element – BalajiBabu Apr 09 '14 at 17:01