work with json in oracle

后端 未结 6 666
梦谈多话
梦谈多话 2020-12-02 15:06

Is there an easy way to work with JSON within oracle? I have a standard procedure that I use to call web services quite often, JSON is a format that I am familiar with in w

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-02 15:33

    It should be noted that as of Oracle 12c there is some native support of JSON. However i don't think in the current form it's as useful as the like of PLJSON included in another answer.

    To use the feature you create a table with a BLOB, CLOB or Varchar2 field and add a constraint against it "column IS JSON". This enforces JSON syntax checking on that column.

    As long as the "IS JSON" constraint is in place you can access the JSON values within using dot notation from SQL. To me, it doesn't seem to provide as powerful manipulation as PLJSON. You can also create an XMLType and then convert to JSON.

    Useful links:
    Oracle docs
    Good tutorial and examples
    Tutorial including XML to JSON

提交回复
热议问题