I'm storing char[] data in Neo4J using the RESTful API in java according to this code snippet:
import org.neo4j.graphdb.GraphDatabaseService;
..
graphdb = new RestGraphDatabase(...);
char[] charArr = {'a', 'b', 'c'};
Node n = graphdb.createNode("stuff");
n.setProperty("mxcharArr", charArr);
If I view the graph through the browser, and when querying the node data back via the API, the data is given as a string:
mxcharArr abc
Instead of the expected 'mxcharArr [a,b,c]'. Is this an issue with the REST API or how Neo4J server is storing the data?
答案 0 :(得分:0)
这很可能是RestGraphDatabase中的一个错误。问题是如何将char []序列化为json(你可以查看source here)。
您可以使用List作为解决方法:
let pathTexture = SKTexture(image: image)
let pathNode = SKSpriteNode(texture: pathTexture)
pathNode.position = CGPointMake(rect.origin.x + rect.width/2 - lineWidth/2, rect.origin.y + rect.height/2 - lineWidth/2)
pathNode.zPosition = 0
someParrentNodeThatOnScene.addChild(pathNode)
UIGraphicsEndImageContext()