Json->>$.field results like "0x4173686C" (resolved with upgrade)

  • I’m currrently running v0.31.2
  • MySQL 5.7

When I try to run this simple JSON_EXTRACT and JSON_UNQUOTE select statement using the shorthand ->>, I get results like 0x4173686C (image below).

If I run c.d->"$.first_name" I don’t see the odd encoding but rather the quoted version of the name. I want to remove the quotes from the results of course.

This issue seems to come and go for me. I had it resolved a while back but I never knew how I resolved it. Has anyone else found a workaround or a reason this occurs? I’ve been searching everywhere for an answer.

Thank you!

Hi @srhyne,

I don’t have a MySQL database to access right now, only MariaDB which doesn’t support the shorthand.

But some databases are pretty sensitive and distinguish between single ' and double " quotes.

And you say that sometimes it works. Do you mean that for the same query it would sometimes work and other times fail, or do you mean that some queries it works, but other not?
If the former, then you should be able to see the exact query in the internal database table query.
If the latter, could it have anything to do with Field Type, which is defined in Admin Settings > Data Model? There’s a “Field contains JSON” type.

Thank you so much for your reply. I was able to resolve the issue simply by upgrading to the newest version.

Regarding it sometimes working. I didn’t not mean on a query to query basis but a version to version basis (months apart).

1 Like

Great you got it working. I actually didn’t expect the shorthand to work on 0.32.x, since the driver is now using MariaDB Connector/J.