Let’s say I have such JSON:
{
id: 1,
somevalue: "text"
}
and I want to create this JSON by PHP function json_encode. I can pretty easy get this JSON in form:
{
"id": "1",
"somevalue": "text"
}
or, using JSON_NUMERIC_CHECK, in form where “id” will be numeric, but “somevalue” can be either numeric or text, depend on its content.
How can I make JSON where “somevalue” always be in text format (with quotes). I’ll parse it by other language, where it is important.
To make
somevaluealways in “text” format: