We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module tb; initial begin JSONValue jv; //json_test ts; //ts = new(); jv = new(); //ts.run_test(); jv.loads({ " { ", "\"n\" : null , ", "\"f\" : false , ", "\"t\" : true , ", "\"i\" : 123 , ", "\"s\" : \"abc\", ", "\"a\" : [ 1, 2, 3 ],", "\"o\" : { \"1\" : 1, \"2\" : 2, \"3\" : 3 }", " } "}); assert(7 == jv.getObjectSize()); // get 7 members in object assert(JSONValue::JSON_NULL == jv.getObjectMember("n").getType()); // get null with key "n" assert(JSONValue::JSON_FALSE == jv.getObjectMember("f").getType()); // get false with key "f" assert(JSONValue::JSON_TRUE == jv.getObjectMember("t").getType()); // get true with key "t" assert(JSONValue::JSON_NUMBER == jv.getObjectMember("i").getType()); // get number with key "i" assert(JSONValue::JSON_STRING == jv.getObjectMember("s").getType()); // get string with key "s" assert(JSONValue::JSON_ARRAY == jv.getObjectMember("a").getType()); // get array with key "a" assert(JSONValue::JSON_OBJECT == jv.getObjectMember("o").getType()); // get object with key "o" end endmodule
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: