Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Get data from Firebase realtime database

Trying to retrieve data from a firebase realtime datasabe, i am using a blank query with the instruccion:

 

 

Any idea to get the data?

 

Thanks in advanced!

 

 
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi v-easonf-msft 

     

    I was able to solve it by adding a document name with ".json" at the end.

     

    let
    Origen = Json.Document(Web.Contents("https://xxxxxxx.com/contacts.json"))
    in
    Origen

     

    I checked that the syntaxiss was correct with the URL you provided me but was not able to enclose the json body in brackets dinamically. I tried using Text.Combine M function to the returned object but was not able to add to an binary object.

     

    Thanks u anyway! 🙂

2 Replies

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi , Anonymous 

    As mentioned by the error message: 

    Additional characters were found at the end of the JSON entry.

    This error is usually caused by your incorrect json format. (Here is a similar related thread)

     

    It is suggest  to enclose the json body in brackets after you have checked that your json syntax is correct (JSON Formatter & Validator beautifies and debugs JSON data with advanced formatting and validation algorithms.) .

    Sample like this:

    [
       {
          "timestamp":"2019-05-11T22:39:13.908347",
          "current_ma":22,
          "voltage_mv":229979,
          "energy_wh":15,
          "power_mw":0
       }, {
          "timestamp":"2019-05-11T22:39:33.810613",
          "current_ma":21,
          "voltage_mv":230081,
          "energy_wh":15,
          "power_mw":0
       }
    ]

     

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-easonf-msft 

       

      I was able to solve it by adding a document name with ".json" at the end.

       

      let
      Origen = Json.Document(Web.Contents("https://xxxxxxx.com/contacts.json"))
      in
      Origen

       

      I checked that the syntaxiss was correct with the URL you provided me but was not able to enclose the json body in brackets dinamically. I tried using Text.Combine M function to the returned object but was not able to add to an binary object.

       

      Thanks u anyway! 🙂