K
K
Konstantin2020-07-15 22:51:06
Node.js
Konstantin, 2020-07-15 22:51:06

What is used to validate json data in node.js?

For example, a service is written that adds articles. What is commonly used for json schema validation?

Of the most popular and flexible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mt. NATS, 2020-07-15
@Dimastik86

function isJson(str) {
    try {
        JSON.parse(str);
    } catch (e) {
        return false;
    }
    return true;
}

js_json_parse <_< here's more
5f0f7f6ee8260479462978.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question