Skip to content

Why are so many numerical parameters in JSON are of string type?

I’ve been looking at the examples in the documentation and also issuing GET requests via REST to get various information about products and categories. One thing that I find unusual is that there are many numerical parameters which are passed as strings (numbers within quotes) in JSON output. Those are for example, category ids in products. Yet the very same category ids are passed as numbers when you request the catalog structure.

What is the reason behind that and what are the consequences of me passing those numerical parameters without quotes as numbers in POST requests?