I'm wondering if there's anyone out there who has Oracle 21c and SDE.ST_GEOMETRY who could help me with a quick test:
If you were to run this query in Oracle 21c, what would it do?
json_object(sde.st_geometry('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))', 26917)) as sdo_geom
I suspect that some new functionality has been added to the JSON_OBJECT() function in Oracle 21c. I have 18c, not 21c, so I'm not able to test it myself.
For example, the following SDO_GEOMETRY query works in 21c in an online environment called db<>fiddle. Of course, that environment doesn't have the SDE.ST_GEOMETRY datatype, so I can't do the ST_GEOMETRY test there.
json_object(sdo_geometry('MULTILINESTRING ((0.0 5.0, 10.0 10.0, 30.0 0.0), (50.0 10.0, 60.0 10.0))')) as sdo_geom
Related: Select JSON text of SDO_GEOMETRY using SQL
I'm curious what would happen if we did something similar in Oracle 21c, but with SDE.ST_GEOMETRY, instead of SDO_GEOMETRY.
I’m aware that ArcGIS Server can return JSON in a feature service from a feature class. I still want to experiment with JSON and SQL.