IRIS JSON Schema Validator

Subscribe
2
Bookmark
2
Details
Releases
Reviews
Issues
Provider

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!!
ObjectScript quality test
Passed
Updated on 04 October 2022
ObjectScript quality report
Category
Solutions
Works with
InterSystems IRISInterSystems IRIS for Health
Tags
Info
Publisher
Visum Consult
Version
1.0.0
Last updated
2021-12-10
Repository
Open
Documentation
Open
License
Link