PROBLEM PARSING A JSON OBJECT RETURNED FROM GPRS "GET" REQUEST

Hi.
Im new to GPRS and json language. im doing a project that involves sending and receiving data to and from a webserver. i’ve been able to receive data in json format using the GSM/GPRS shield from itead and the library from openelectronics.org. I modified their example code so as to include the json decoding part.
the problem is that i cant decode and print the parameters on the serial monitor.
Is there something wrong with my code? i have included the string response and commented it to show exactly what i im getting from my “GET” request. please help.

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h" //is a class used to connect to the internet and other applications
#include <ArduinoJson.h>
//StaticJsonBuffer<200> jsonBuffer;
InetGSM inet;//For the sake of simplicity we chosen to include the data connection activation phase in the sketch setup.
//Such a choice is not mandatory, but was preferred for clarity reasons, emphasizing the real part
//of the program within the loop function.

//initialise intergers k and j
int k = 0;
int j = 0;
int numdata;
int i = 0;

char str[] = "Date: "; //declare a variable xter that dakes in the date
char msg[50];      //msg is a string taking 200 xters
char data;          //declare a char data
char inSerial[50]; //takes in serial data

boolean found = false; //initialise the boolean found to false first ie not true
boolean started = false; //initialise the boolean started to false first ie not true

void setup()

{
  //Serial connection.
  Serial.begin(9600);

  if (gsm.begin(9600))
  { //Connects to the GSM network identified on the SIM card.
    Serial.println("\nstatus=READY"); //print okay msg if network is identified
    started = true;                   // started= true to show connection
  }


  //if simcard not connected to the network, print idle message.
  else Serial.println("\nstatus=IDLE");

  if (started)
  {

    if (inet.attachGPRS("Bew.orange.co.ke", "", "")) //takes in INTERNET APN, USERNAME AND PASSWORD

      //of the simcard and verifies if they are correct so as to authenticate network connection
      Serial.println("status=ATTACHED");

    else Serial.println("status=ERROR");

    delay(1000);
    numdata = inet.httpGET("open-data-service.appspot.com", 80, "/server?svc=open_data&msg=get&api_key=x0ti684hwe71t88vr8dc&kind=Driver&where_FIRSTNAME=Peter", msg, 50);
  }

  while (1)
  {
    data = gsm.read();   //data is what we read from the buffer through the gsm.read() command

    if (data > 0) {      //if we have data in the serial monitor, print it
      Serial.print(data);

      if (data == str[k]) { //if data concides with date,increment k
        k++;
        if (k + 1 == strlen(str))
        {
          found = true;
          msg[0] = '\0';
          j = 0;
        }

      }

      else
      {
        k = 0;
      }
    }

    if (found)
    {
      if (data != '\n')
      {
        if (data > 0)
        {
          msg[j] = data;
          j++;
        }
      }

      else
      {
        msg[j] = data;
        msg[j + 1] = '\0';
        found = false;

        Serial.print("DATA: ");
        Serial.println(msg);
      
        
        //{"message":"get","response":{"data":{"ID_NUMBER":["58"],"FIRSTNAME":["Peter"],"PHONENUMBER":
        //["0724359344"],"AGE":["25"],"API_KEY":["x0ti684hwe71t88vr8dc"],"LASTNAME":["Ndehi"]},"_cache_status_":{}}}
        
      }
    }
  }
  
  StaticJsonBuffer<200> jsonBuffer;
  JsonObject & root = jsonBuffer.parseObject(msg);
  JsonObject & message = root["message"];
  JsonObject & response = root["response"];
  JsonObject & data = response["data"];
  const char* ID_NUMBER   = data["ID_NUMBER"][0];
  const char* FIRSTNAME   =  data["FIRSTNAME"][0];
  const char* PHONENUMBER = data["PHONENUMBER"][0];
  double AGE              = data["AGE"][0];
  const char* LASTNAME    = data["LASTNAME"][0];

  //print the values
  Serial.println(ID_NUMBER);
  Serial.println(FIRSTNAME);
  Serial.println(LASTNAME);
  Serial.println(AGE , 4);
  Serial.println(PHONENUMBER);

};



void loop()
{

};

an attachment of the serial monitor

serial monitor.txt (1.21 KB)

Stop cross-posting. Stop shouting. Before I delete your account.