Nebula 数据库版本 2.0.1,nebula-java- client :2.0.0-SNAPSHOT
问题描述:
我链接到nebula 数据库查询 一个节点 并想通过我提供的api接口返回这个节点
我执行的脚本没问题 如下 :
MATCH (a:player {name: "Tim Duncan"}) return a;
我java 程序接收到了 数据结构 如图:
我的代码操作步骤是:
JSON.toJSONString(value.asNode());
ERROR 2146 --- [nio-8090-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.alibaba.fastjson.JSONException: write javaBean error, fastjson version 1.2.58, class com.vesoft.nebula.Value, fieldName : value] with root cause
java.lang.RuntimeException: Cannot get field 'bVal' because union is currently set to sVal
我使用的是阿里的fastjson version 1.2.58, 我这个node 是不是不能直接转 ,需要进一步解析后才行转json