json-validator-client
Reactive icon

JSON Validator {Client}

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 27 June 2023
 by 
EONE TECHNOLOGIES PRIVATE LIMITED
5.0
 (1 rating)
json-validator-client

JSON Validator {Client}

Documentation
1.0.0

A common use of JSON is to exchange data to/from a web server.

When receiving data from a web server, the data is always a string.

Parse the data with JSON.parse(), and the data becomes a JavaScript object.


Example - Parsing JSON

Imagine we received this text from a web server:

'{"name":"John", "age":30, "city":"New York"}'

Use the JavaScript function JSON.parse() to convert text into a JavaScript object:

const obj = JSON.parse('{"name":"John", "age":30, "city":"New York"}');

Make sure the text is in JSON format, or else you will get a syntax error.