I am currently working on a calorie tracking app that uses firestore.
I used firestore to store food items in a document. However, some of these food items contains restricted characters (‘~’, ‘*’, ‘/’, ‘[‘, or ‘]’) that are not allowed in field path.
For instance, this map that contains the food items. Note the use of the restricted character.
Is there a recommended way of handling the use of restricted characters? I’m thinking of encoding and decoding the strings before updating firestore and decoding them when getting the documents, thru replacing all restricted characters with specific strings.
Appreciate the help! Thank you!