I’m using Spring-Boot + Jackson to implement a Rest API. When I return some object from my methods the controllers are building a JSON compliant response. However, that’s not happening when I return primitive wrappers as String or Long (they don’t act as property-value maps, they’re just value wrappers in Java). Is it a non-desirable practice to return a non JSON compliant response from the API?
↧