Ver Mensaje Individual
  #1 (permalink)  
Antiguo 02/01/2013, 09:35
sahch
 
Fecha de Ingreso: junio-2010
Mensajes: 16
Antigüedad: 13 años, 11 meses
Puntos: 6
Expresión regular en un JSON

Hola,

necesito ayuda para poder procesar un json, el cual contiene un patrón muy repetido que necesito quitar.

Código:
{
      "tipo": "teclado",
      "id": 2,
      "idPadre": 1,
      "x": 413.5,
      "y": 317,
      "width": 117,
      "height": 66
    },
    {
      "tipo": "caballo",
      "id": 3,
      "idPadre": 2,
      "x": 412.5,
      "y": 421,
      "width": 117,
      "height": 66
    },
    {
      "tipo": "qwerty",
      "id": 4,
      "idPadre": -1,
      "x": 52.5,
      "y": 334,
      "width": 117,
      "height": 66
    }

Necesito una expresión regular para poder quitar X, Y WIDTH y HEIGHT

Código:
      "x": 52.5,
      "y": 334,
      "width": 117,
      "height": 66
espero puedan explicarme como solucionar esto, y de antemano muchas gracias