I am using Jackson in the jsonrpc4j to access a remote service. In my Java application there are no defined classes for the return values, so deserialization produces generic LinkedHashMaps. So I cannot put any annotations anywhere. jsonrpc4j can take in a Jackson ObjectMapper object. The remote service responds with structured json objects, some fields of which are very big decimal numbers, and Jackson treats them as Doubles. An example object can look like this
{"s1":"zxcvb","f1":20.00234,"a1":[{"f2":3883.99400943},{"f3":0.00093944432}]}
I would like it instead interpreting all the numbers as either strings or Decimals with configurable precision and parsing them correctly according to those types. Is it possible to do this using a modified ObjectMapper object? If not that, what would be the easiest way to achieve this?