cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Insert json-ld structure in neo4j graph database

Hi, I'm trying create a node in graph database

CREATE (b:Book)
SET b.id = 100,
b.@context = "https://schema.org",
b.id = "Biblioteca - Sfogliatore di Libri - Fondazione Luigi Einaudi",
b.type = "Book",
b.name = "Cronache economiche e politiche di un trentennio (1893-1925) : Volume 1",
b.datePublished = 1959,
b.bookFormat = "EPUB",
b.inLanguage = "it",
b.isPartOf = "Opere di Luigi Einaudi",
b.volumeNumber = 1
RETURN 'inserting ' + b.id;

I get a syntax error from cypher: Invalid input '@': expected an identifier, whitespace, a function name or a property key name (line 3, column 7 (offset: 38))
" b.@context = "https://schema.org","
^
It seems I can't declare a property with "@" special character. Is that so?
I change into b.context but I want save in database a json-ld structure.

1 ACCEPTED SOLUTION

martin3
Node Clone

Maybe you can try using backticks?

View solution in original post

1 REPLY 1

martin3
Node Clone

Maybe you can try using backticks?