#1 2013-07-26 15:02:53

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Remove double quote

In JSON, a string is a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes.

I would like to remove double quote in my json encode. When I type into address bar:
http://localhost:777/root/Employee/13  it returns a string with extra quotes around Department RawUTF.

{
    "ID" : 13,
    "Department" : "{\"value\" : \"Plant\",\"ordinal\" : 2}",
    "City" : "Sete Lagoas"
}

Any idea?

Offline

#2 2013-07-26 16:12:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Remove double quote

As stated by the SAD pdf, it is not possible.

The "Departement" object is stored as TEXT in the database column, and extracted directly as such from the DB.
You just need to decode the JSON string as a JSON object. For instance, it is just one line of JavaScript.

Offline

Board footer

Powered by FluxBB