[英]Neo4j Node/Relationship to Byte[]
I have a StorageClass containing 我有一个包含的StorageClass
public HashMap<Integer, Object> writeSet;
Key = Node/Relationship Index Value = Node or Relationship 键=节点/关系索引值=节点或关系
I have to serialize and later deserialize this HashMap to and from a Byte[]. 我必须序列化此HashMap,然后再反序列化到Byte []。
Since Node and Relationship doesn't seem to be serializable, is it possible to convert this HashMap to a ByteArray? 由于节点和关系似乎无法序列化,是否有可能将此HashMap转换为ByteArray?
Thank you already 已经谢谢你了
You can also just receive them as JSON or other format on the server, that's way easier. 您也可以在服务器上将它们作为JSON或其他格式接收,这更容易。
See: http://jexp.github.io/blog/html/load_json.html 参见: http : //jexp.github.io/blog/html/load_json.html
to convert a property-container into a map: 将属性容器转换为地图:
for (String prop : pc.getPropertyKeys()) {
map.put(prop,pc.getProperty(prop));
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.