You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, a huge thanks for this true gem! This is my first time trying to implement an API, and after failing to implement other 'prebuild' stores/backends for the Annotation-Tool I'm trying to use , I was happy to discover xmysql and got it running in no time.
What I'm struggling with at the moment, I assume is a type conversion issue, somewhere in the xmysql / mariadb pipeline.
I manage to POST stringified JSON with Annotator1.2.10, which are generated in a format like:
{"permissions":{"read":[],"update":[],"delete":[],"admin":[]}, "user":"testing", "ranges":[{"start":"/div[2]/div[2]/div[1]/p[2]","startOffset":26,"end":"/div[2]/div[2]/div[1]/p[2]","endOffset":39}], "quote":"it works, except for the strange Json Array", "text":"here's some random annotation comment", "tags":["xmysql_is-awesome"]}
This works fine. All the columns get stored and returned in the proper format, except for the ranges and permissions columns. GET returns [object Object] in those two cases, which can't be parsed back.
{"id":18, "annotator_schemaversion":null, "created":"2020-04-09T08:39:50.000Z", "updated":"2020-04-09T08:39:50.000Z", "text":"here's some random annotation comment", "quote":"it works, except for the strange Json Array", "uri":null, "ranges":"[object Object]", "user":"testing", "consumer":null, "tags":"thanks_for_your_help", "permissions":"[object Object]"}
I tried several different datatypes for the columns of ranges and permissions (blob, varchar, json/longtext), but that didn't really help.
Assuming it's a type-identification / conversion issue, I wanted to ask if you can help me figure out where in xmysql that happens, and how I could proceed / what I could try next.
cheers
The text was updated successfully, but these errors were encountered:
node -v: 13.9.0
npm -v 6.13.7
mysql --version 15.1 Distrib 10.3.22-MariaDB
hello o1lab and xmysql community!
first of all, a huge thanks for this true gem! This is my first time trying to implement an API, and after failing to implement other 'prebuild' stores/backends for the Annotation-Tool I'm trying to use , I was happy to discover xmysql and got it running in no time.
What I'm struggling with at the moment, I assume is a type conversion issue, somewhere in the xmysql / mariadb pipeline.
I manage to POST stringified JSON with Annotator1.2.10, which are generated in a format like:
{"permissions":{"read":[],"update":[],"delete":[],"admin":[]}, "user":"testing", "ranges":[{"start":"/div[2]/div[2]/div[1]/p[2]","startOffset":26,"end":"/div[2]/div[2]/div[1]/p[2]","endOffset":39}], "quote":"it works, except for the strange Json Array", "text":"here's some random annotation comment", "tags":["xmysql_is-awesome"]}
This works fine. All the columns get stored and returned in the proper format, except for the ranges and permissions columns. GET returns [object Object] in those two cases, which can't be parsed back.
{"id":18, "annotator_schemaversion":null, "created":"2020-04-09T08:39:50.000Z", "updated":"2020-04-09T08:39:50.000Z", "text":"here's some random annotation comment", "quote":"it works, except for the strange Json Array", "uri":null, "ranges":"[object Object]", "user":"testing", "consumer":null, "tags":"thanks_for_your_help", "permissions":"[object Object]"}
I tried several different datatypes for the columns of ranges and permissions (blob, varchar, json/longtext), but that didn't really help.
Assuming it's a type-identification / conversion issue, I wanted to ask if you can help me figure out where in xmysql that happens, and how I could proceed / what I could try next.
cheers
The text was updated successfully, but these errors were encountered: