SQL Language (MOSC)

MOSC Banner

How to enforce structure/rules on a JSON document

in SQL Language (MOSC) 6 commentsAnswered ✓

I couldn't find a section designated specifically to JSON, so sorry if this question is misplaced.


I'm wondering if Oracle (19c) allows JSON document validation which goes beyond merely checking if the document is a valid JSON.


For example, in MongoDB one could define a schema and enforce some rules like this:

var schema = {

"id": "/All",

"type": "object",

"properties": {

"city": {"type": "object", "required": true},

"phone": {"type": "string", "required": false },

"misc": {"type": "string", "required": false },

"population": {"type": "number", "required": true, "minimum": -100, "maximum": 100 }

}

}


Wondering if Oracle has the same feature.

In other words, looking for something that goes beyond a rudimentary check constrain like this:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center