mercredi 18 août 2021

Parse a string json that contain another json string

I have a json which has another json inside it. But it is inside double quotes due to this it is given me a parsing error. Is there any way to parse this json

obj="{"Name":"{"FirstName":"Douglas","LastName":"Crockford"}"}" I want it like this after parsing

{Name:{FirstName:"Douglas",LastName:"Crockford"}} Is there any way to achieve this using Ruby?

Aucun commentaire:

Enregistrer un commentaire