Gremlinq / ExRam.Gremlinq

A .NET object-graph-mapper for Apache TinkerPop™ Gremlin enabled databases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

String's with an ISO-8601 date value getting parsed on query

koenbeuk opened this issue · comments

commented

(New to Gremlin and Gremlinq, awesome work! will see where I can contribute)

I can store a string who's value happens to be an ISO-8601 compatible date value. When I then use the Gremlin Console I'm getting the same value back. However when I'm querying through Gremlinq, I'm getting a parsed version of that string back.

Given an input of 2021-03-31T14:57:20.3482309Z, I'm receiving an output of: 03/31/2021 14:57:20

I will issue a PR with a unit test proving this behavior in a minute.

Thanks a lot for the PR! This is how a bug repro is supposed to look like 👍. It's indeed odd and unwanted behaviour. I'll have a look.

It's related to JamesNK/Newtonsoft.Json#862. There's a workaround setting, unfortunately, the parsing already happens in the underlying Gremlin.Net library and I don't currently see a way to override this behaviour. I assume this will change once Gremlin.Net 3.5 is released which allows to customize deserialization.

@spmallette Is there an ETA for Tinkerpop 3.5?

You could try this workaround. It's a global setting so it probably won't ever be set within Gremlinq but it might work for you.

commented

@danielcweber Thanks for the suggestion. I indeed tried that option to no avail (I suppose Gremlin.Net may be using custom settings).

In my case I am storing a VersionId (Azure blob storage blob versioning) that happens to be in the form of a ISO-8601 date string. I'm now simply prefixing this versionId. Not a great experience but it works.

As it seems this issue is with Gremlin.Net, I will try to replicate it there and file an issue with that project.

It's actually not really an issue of Gremlin.Net. Plus, it already moved from Newtonsoft.Json to System.Text.Json on their development branch. No need/use to file an issue there.

Is there an ETA for Tinkerpop 3.5?

It hasn't been discussed fully yet in the community but I'm hoping for late April.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This can't be fixed at this time but should remain open.

Hopefully fixed by #221.

Fix included in packages >=9.0.0-preview.127 (avaliable on Github packages).

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Fixed by #221. Fix included in packages >=9.0.0-preview.127 (avaliable on Github packages).