Ver Mensaje Individual
  #6  
Antiguo 27-01-2015
MaxiDucoli MaxiDucoli is offline
Miembro
 
Registrado: feb 2006
Posts: 134
Reputación: 19
MaxiDucoli Va por buen camino
El texto completo es muy largo, igual lo coloco.
Pero el JSON me da nil cuando pongo:

Hago una variable llamada nombre : string y cargo el contenido de un memo en esa variable (seria el texto completo del fondo) y lo trato de cargar de la siguiente manera:


Código Delphi [-]
var
 JSON: TlkJSONobject;
  UnObjetoJSON: TlkJSONobject;
  UnArrayJSON,
  OtroArrayJSON: TlkJSONlist;
begin

   JSON:=TlkJSONobject.Create;
  try
    // parseamos el JSON
    JSON:=TlkJSON.ParseText(memo2.Text) as TlkJSONobject;

    UnArrayJSON:=JSON.Field['resul'] as TlkJSONlist;

    for n:=0 to UnArrayJSON.Count - 1 do
        begin
          // ...
          memo2.Text := UnArrayJSON.Child[n].Field['name'].Value;
        end;
  finally
    JSON.Free;
  end;


Cuando voy a debugger, JSON me sale con valor NIL- Por lo que entiendo no está cargando el strin en ParseText.
Es así??






El texto esta adjunto por que me paso de los 2000 caracateres.
Archivos Adjuntos
Tipo de Archivo: rar texto.rar (5,2 KB, 15 visitas)
Responder Con Cita