Skip to content

grip_json_object_has_value don't work #155

@wopox1337

Description

@wopox1337
#include <amxmodx>
#include <json>
#include <grip>

#pragma ctrlchar '\'
new const g_sJSON[] = "{  }";

public plugin_init()
{
///// TEST #1 (native JSON)
    new JSON:pObj = json_parse(g_sJSON);
    server_print(" [Method #1]: json_object_has_value():%i",
        json_object_has_value(pObj, "someKey")
    );

///// TEST #2 (GRip JSON)
    new sErrBuffer[128];
    new GripJSONValue:pObj1 = grip_json_parse_string(g_sJSON, sErrBuffer, charsmax(sErrBuffer));
    server_print(" [Method #2]: grip_json_object_has_value():%i",
        grip_json_object_has_value(pObj1, "someKey")
    );
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions