gremlin> import java.time.Instant
gremlin> graph=TinkerGraph.open()
==>tinkergraph[vertices:0 edges:0]
gremlin> v = graph.addVertex()
==>v[0]
gremlin> v.property("time",Instant.now())
==>vp[time->2018-04-09T16:10:...]
gremlin> v.value("time")
==>2018-04-09T16:10:43.688Z
gremlin> v.value("time").getClass()
==>class java.time.Instant
gremlin> graph.io(IoCore.graphml()).writeGraph("/tmp/graph.graphml")
==>null
gremlin> graph.io(IoCore.graphson()).writeGraph("/tmp/graph.graphson")
==>null
gremlin> graph.io(IoCore.gryo()).writeGraph("/tmp/graph.gryo")
==>null
gremlin> graph.clear()
==>null
gremlin> graph.traversal().V().values("time").next().getClass()
==>class java.lang.String
Clear the graph
gremlin> graph.clear()
==>null
gremlin> graph.io(IoCore.gryo()).readGraph("/tmp/graph.gryo")
==>null
gremlin> graph.traversal().V().values("time").next().getClass()
==>class java.time.Instant
Clear the graph
gremlin> graph.clear()
==>null
gremlin> graph.io(IoCore.graphson()).readGraph("/tmp/graph.graphson")
==>null
gremlin> graph.traversal().V().values("time").next().getClass()
==>class java.util.LinkedHashMap
------------------------------------------------------------------------------------
{
"id": {
"@type": "g:Int64",
"@value": 0
},
"label": "vertex",
"properties": {
"time": [
{
"id": {
"@type": "g:Int64",
"@value": 1
},
"value": {
"nano": 688000000,
"epochSecond": {
"@type": "g:Int64",
"@value": 1523290243
}
}
}
]
}
}
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/c15dbd51-5a56-4e8f-8a5b-17f2db7c365f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mapper = GraphSONMapper.build().
typeInfo(TypeInfo.PARTIAL_TYPES).
addCustomModule(GraphSONXModuleV3d0.build().create(false)).
version(GraphSONVersion.V3_0).create().createMapper()
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/bb99a9d3-4acb-4ab4-a071-d4134d558e35%40googlegroups.com.