About EasyMorph Tutorials & Examples Web-help

How to put a value always in quotes in JSON

The “Construct JSON” action wraps text values in quotes in the resulting JSON, while preserving numbers as they are. But what if numbers should also be wrapped in quotes?

This can happen when, for instance, the attribute is a name which may occasionally be numeric. E.g.

{
 "Name":2019
}

In this case the solution is to convert all values in column [Name] to text first. The simplest way to do this is just to use the “Convert data types” action in the “Everything to text” mode. When numbers have become text values, they will be wrapped in quotes.

{
 "Name":"2019"
}
To learn more about EasyMorph visit easymorph.com.