I am implementing a firebase example as given in their documentations. I am facing this error:
com.fasterxml.jackson.databind.JsonMappingException: No
Firebase uses -JRHTHaIs-jNPLXOQivY as the key to your object
{
author: "gracehop"
title: "Announcing COBOL, a New Programming Language"
}
You have to use this as the key to acces the object. You will have to send the correct request to the api. In this case it will be
https://docs-examples.firebaseio.com/web/saving-data/fireblog/posts/-JRHTHaIs-jNPLXOQivY
If you want to receive an array from Firebase you'll have to store it like this.
posts{
"1":{
author: "gracehop"
title: "Announcing COBOL, a New Programming Language"
},
"2":{
author: "alanisawesome"
title: "The Turing Machine"
}
}
Firebase has no native support for arrays. If you store an array, it really gets stored as an “object” with integers as the key names.
Check out this Firebase blog post for more information