JSON not working. Error BAD POINTER

Post Reply
Javi
Posts: 29
Joined: Sat Jun 11, 2022 5:14 am
Been thanked: 10 times

JSON not working. Error BAD POINTER

Post by Javi »

test.json

Code: Select all

{
  "name": "JOHN"
}  

test1.pi

Code: Select all

class Test1 implements DOS_Program
{
    virtual Start()
    {
        _console = GetDOS().GetConsole();
        
        json = JSON_Open ("test.json");
		
        json_name= JSON_FindObjectItem(json, "name"); 
		name = JSON_ToString(json_name);
		
        
        _console.PrintLn("Hola mundo!!: " + name);
        _console.Input("", null, 1);
        End(0);
    }
}
Error JSON BAD POINTER
Post Reply