Having trouble defining a JSON schema for Oracle

44 views
Skip to first unread message

David Tran

unread,
Jan 25, 2019, 4:09:25 AM1/25/19
to JSON Schema
Hello All!

Apparently my question is so noob I couldn't find a topic about it.

I'm trying to make a json schema for Oracle which will allow me to map data from CSV to JSON. 
 know there are some formatting issues between the formats but I'm performing this task in Oracle's interface which is suppose to take care of everything so long as I provide a proper json schema.

The schema I need to define is very simple. It's for an invoice: containing an invoice number, invoice amount, and a name

{
  "title": "invoice",
  "type": "object",
  "properties": {
    "InvoiceNumber":{
    "type":"string",
    "description": "number of invoice"
    },
    "InvoiceAmount":{
    "type":"number",
    "description": "amount of invoice"
    },
    "CustomerName":{
    "type":"string",
    "description": "name of customer on invoice"
    }
  }
}

Oracle is giving me a hard time telling me it is an improper schema.The thing is I actually took this schema from json-schema.org and changed some of the property names and descriptions. 

Where am I going wrong?

Ben Hutton (@Relequestual)

unread,
Jan 29, 2019, 11:46:20 AM1/29/19
to JSON Schema
Hey David,

This is a valid JSON Schema. It doesn't give you any info beyond "this isn't valid"?

It MAY be that they only support draft-4 version schemas, but they should be telling you if that's the case, and I can't find any documentation to support that.

What happens if you change that "07" to "04", out of interest?


Apologoes, I've only just seen this email come through.
For more immediate answers, use StackOverflow with the json-schema tag (it's monitored) or join our official slack.

Cheers
Ben
Reply all
Reply to author
Forward
0 new messages