Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Valid JSON_ARRAY_T

User_CI7SYOct 15 2021

Could you please help me understand why 1) is not valid JSON_ARRAY_T and 2) is?
1)ARR := JSON_ARRAY_T('[{"Address1":"3121,"Address2":"Suite 301"},{"Address1":"3121","Address2":"Suite 301"}]');
2)ARR := JSON_ARRAY_T('[{"Address1":"3121"},{"Address1":"3121"}]');

I run below code and it fails.
DECLARE
ARR JSON_ARRAY_T ;
BEGIN
ARR := JSON_ARRAY_T('[{"Address1":"3121,"Address2":"Suite 301"},{"Address1":"3121","Address2":"Suite 301"}]');
DBMS_OUTPUT.PUT_LINE('BASIC: ' || ARR.TO_STRING);
FOR indx IN 0 .. ARR.get_size - 1
LOOP
DBMS_OUTPUT.put_line(ARR.get_string(indx));
END LOOP;
END;

Error:
Error report -
ORA-40441: JSON syntax error
ORA-06512: at "SYS.JDOM_T", line 4
ORA-06512: at "SYS.JSON_ARRAY_T", line 29
ORA-06512: at line 6
40441. 00000 - "JSON syntax error"
*Cause: The provided JavaScript Object Notation (JSON) data had invalid
syntax and could not be parsed.
*Action: Provide JSON data with the correct syntax.

Comments

Ices_Eyes
Up...!
Ices_Eyes
Noone is experiencing the same issue?
-K-
My suggestion is to open a SR at Metalink/MOS (if you have a database support contract), else hope someone from the team is interested in logging/debugging this through the forum.

Regards,
K.
Ices_Eyes
-K- wrote:
My suggestion is to open a SR at Metalink/MOS (if you have a database support contract), else hope someone from the team is interested in logging/debugging this through the forum.

Regards,
K.
Unfortunately I have no a support contract, so...Hoping someone of the developer read this...Maybe it will be fixed in the next release :)

PS: if some developer read this, please let me know, so I stop to try to mantaint this thread alive :P
Ices_Eyes
Any news about this bug? :)
hlaebe
Hi,
did you try GeoRaptor [GeoRaptor |http://sourceforge.net/projects/georaptor/] ? We have tools for indexing, maintaining metadata (which might be the reason for this non-support in SQL Developer, since metadata is required for indexing).

Give it a try, it is free!

Regards,
Holger

Edited by: hlaebe on 03.02.2010 08:56
Ices_Eyes
Thanks, that work! And is pretty useful too... :)
Ices_Eyes
By the way, this bug is still present in version 2.1.1... :-S
1 - 8

Post Details

Added on Oct 15 2021
2 comments
277 views