How to convert an integer (int, Short, Long, Float, Double) to String

Hi all,
great debate, my opinion is also in line with @reamon, generally don’t use strong types in an integration service. No real advantage and lots of conversion nightmares.

That’s why in 10.15 we went back to our json services, which were out of kilter with this pattern and decided to create a new replacement service, namely;

pub.json:jsonToDocument

This service assumes that everything should be treated as strings, unless otherwise stated or defined by a Document type if provided. We decided to create a new service to avoid introducing breaking changes into existing use. So the above service should be your go to service for json transformation.

However, this is not a hard rule as their are also exceptions such a using Date objects with JDBC adapter services, and you certainly should not try this with the implementation of a java service. The signature can be string only, but you should then convert to proper java types in the body of the code.

regards,
John.