Skip to content

Invoking is_array() function creates "null" value #77

@drewpts

Description

@drewpts

Hello.

 if (j[SUBPR_DESCR].is_array()) {
                if (j[SUBPR_DESCR].at(0).is_string() == false)
                    return json::parse(error_code + "Wrong values type of subprojects key!\"}");
            } else if (!j[SUBPR_DESCR].is_null() && !j[SUBPR_DESCR].is_array()) {
                return json::parse(error_code + "Corrupted or absent subprojects key!\"}");
            }

After invoking such function on json object data with key SUBPR_DESCR appearing with value "none".

2015-05-28 12 46 21
2015-05-28 12 46 31

[offtop] Lol, horrible char * to string casting at the bottom of image 🐹 [/offtop]

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: invalidthe issue is not related to the library

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions