Tuesday, July 22, 2025

stringify() or to_string() ?

While I was experimenting with genAI LLMs applied to generating PL/SQL code, I noticed that Claude-Sonnet created a function containing a stringify() method applied to a JSON_ELEMENT_T variable, a method whose existence I wasn't aware of.
l_string := j_elem.stringify();

This method is documented in the serialization methods paragraph in Oracle23ai JSON Developer's Guide, but it turns out that it works also in Oracle19c (at least on version 19.21.0.0.0) even if the guide doesn't mention it.

As far as I could see it's equivalent to method to_string(), so you can pick whichever you like.

No comments:

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles