if Jason is empty



    majid ghasemi

    throw new InvalidOperationException("JSON object does not have any keys");

    This code checks to see if the JSON object has any keys. If it does not, it throws an InvalidOperationException.

    if (Object.keys(retJson).length == 0)
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.