Home
last modified time | relevance | path

Searched refs:rawJson (Results 1 – 2 of 2) sorted by relevance

/external/jsoncpp/example/readFromString/
DreadFromString.cpp13 const std::string rawJson = R"({"Age": 20, "Name": "colin"})"; in main() local
14 const auto rawJsonLength = static_cast<int>(rawJson.length()); in main()
21 reader.parse(rawJson, root); in main()
25 if (!reader->parse(rawJson.c_str(), rawJson.c_str() + rawJsonLength, &root, in main()
/external/golang-protobuf/jsonpb/
Djsonpb_test.go583 rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }`
584 msg := dynamicMessage{RawJson: rawJson}
589 if str != rawJson {
590 t.Errorf("marshaling JSON produced incorrect output: got %s, wanted %s", str, rawJson)
1040 rawJson := `{ "foo": "bar", "baz": [0, 1, 2, 3] }`
1042 if err := Unmarshal(strings.NewReader(rawJson), &msg); err != nil {
1045 if msg.RawJson != rawJson {
1046 …ssage contents not set correctly after unmarshaling JSON: got %s, wanted %s", msg.RawJson, rawJson)
1051 rawJson := `{"stringField":null}`
1053 if err := Unmarshal(strings.NewReader(rawJson), &ptrFieldMsg); err != nil {
[all …]