• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to get the structure of json element?

Resolved: How to get the structure of json element?

0
By Isaac Tonny on 16/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

does a function exist (or how to create such a function) that take a json element and return the structure.
For instance, I would like a function f that in this case :
returns [a integer, b [ a integer]] or somethings equivalent

Answer:

From Oracle 12.2, You can use JSON_DATAGUIDE:
Which outputs:

PATH TYPE $ array $.a number $.b array $.b[*] string $.b.a number


If you want something more detailed then you are probably going to have to write your own JSON parser in PL/SQL (or Java and compile it in the database).
db<>fiddle here

If you have better answer, please add a comment about this, thank you!

json oracle sql
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Best way to create 3d matrix of variables in PULP

24/03/2023

Resolved: Openlayers: Update clusters depending on filter (geometryFunction)

24/03/2023

Resolved: Getting ‘502 Bad Gateway’ while deploying Springboot app in EKS

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.