Home Applications IRIS JSON Schema Validator

IRIS JSON Schema Validator

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
4.5
1 reviews
0
Awards
624
Views
0
IPM installs
4
2
Details
Releases  (1)
Reviews  (1)
Issues
Articles  (1)
InterSystems IRIS JSON Schema support.

What's new in this version

Initial Release

iris-json-schema

InterSystems IRIS JSON Schema support

Procedures to use this app

  1. Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/iris-json-schema.git
  1. Open the terminal in this directory and run:
$ docker-compose build
  1. Run the IRIS container with your project:
$ docker-compose up
  1. Go to the IRIS terminal (open a new VSCode Terminal)
docker exec -it iris-json-schema_iris_1  bash
iris session iris
  1. Change to the IRISAPP namespace
set $namespace = "IRISAPP"
  1. Get a sample JSON Schema
set jsonSchema = ##class(dc.irisjsonschema.JSONSchemaValidator).GetJSONSchema()
  1. Get a sample valid JSON
set jsonContent = ##class(dc.irisjsonschema.JSONSchemaValidator).GetValidSampleJSON()
  1. Get a validation equals to valid
set st = ##class(dc.irisjsonschema.JSONSchemaValidator).Validate(jsonSchema,jsonContent,.result)
write result
  1. Now, get a sample INVALID JSON
set jsonContent = ##class(dc.irisjsonschema.JSONSchemaValidator).GetInvalidSampleJSON()
  1. Now, Get a validation equals to INVALID
set st = ##class(dc.irisjsonschema.JSONSchemaValidator).Validate(jsonSchema,jsonContent,.result)
write result
  1. Validate any other JSON using any JSON Schema and Enjoy!!
Made with
Version
1.0.010 Dec, 2021
ObjectScript quality test
Category
Solutions
Works with
InterSystems IRISInterSystems IRIS for Health
First published
10 Dec, 2021