Do you know :param jsontype => {akey: 'avalue'} doesn't work?(at least on my laptop with the latest neo4j desktop/windows10)

I searched and tested several hours and solved it like this:
:param jsontype : {akey:'avalue'}

Hey guys please!

Hi, Do you have a question, or are you indicating documentation somewhere needs to be updated? (I don't see a reference/url)

Yea, I mean if it's really working with ":" not with "=>" then you must notify this important syntax correctly in the manual of the product which we sell to customers for million dollars.

After a little digging on parameters, I can confirm a few things

  • :param variableName => 'simple value' works as documented (simple data e.g. integer, string, float)
  • :param variableName => {mapStructureData: 'test'} does not work (for maps)
  • :param variableName : {complexMap: 'test'} does appear to work (with maps) However, if this is the correct syntax to use, I could not find it anywhere in the documentation, or in community discussions. (though there are a few interesting discussions)

Notes:

  • I believe you are referring to the Neo4j browser only (and not how to use parameters from a language) I mention this because some of the documentation mixes the two topics (which can lead to confusion, I agree).
  • The syntax for :param has changed over time... With a distinct change from 3.5 to 4.x (which could also lead to confusion, and gaps in documentation)

The old parameter syntax {param} was deprecated in Neo4j 3.0 and removed entirely in Neo4j 4.0. Using it will result in a syntax error. However, it is still possible to use it, with warnings, if you prefix the query with CYPHER 3.5 . See Cypher Compatibility for further information.

1 Like

Thank you for your effort about this matter. Neo4j must handle this.