Can't Post data containing $ in a key to Firebase

firebase

Solution

It's supposed to be a valid JSON but it seems like it's a limitation for FireBase

From FireBase Documentation:

Character Set Limitations

Note that URLs used to construct Firebase references may contain any unicode characters except:

- `.` (period)

- `$` (dollar sign)

- `[` (left square bracket)

- `]` (right square bracket)

- `#` (hash or pound sign)

- `/` (forward slash)

Problem

I'm attempting to post some data into Firebase (relative part of the URL is /messages.json). The following request content: ``` {"gsx$enddate":"sometime"} ``` Gives the following error: Invalid data; couldn't parse JSON object, array, or value. Perhaps you're using invalid characters in your key names. This is valid JSON however. What am I doing wrong?

Original source

Related problems