Start a new topic
Answered

Wrong data format

When trying to do the "First Poll Indicator App" tutorial I get the error "Wrong data format" when using the Dropbox direct link. What possibly can I be doing wrong?


http://lametric-documentation.readthedocs.io/en/latest/guides/first-steps/first-lametric-indicator-app.html#poll-indicator-app






Best Answer

Hi guys,


UPDATE: fixed has been released


There was an issue with URL validation, the fix is coming soon.

Apologies for the inconvenience.


3 people have this question

Having the same problem here ...


1 person likes this

My code outputs the json string but the cotype is html... still get wrong data format.


 

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>Demo</title>
</head>
<body>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
    <script>

    //Get the status
    $.getJSON('https://api.mcsrvstat.us/1/SERVERIP', function(status) {

      	//Show a list of players
      	$.each(status.players.list, function(index, player){
          var data = {
              "frames": [
                  {
                      "text": "Server",
                      "icon": "i16865"
                  },
                  {
                      "text": player,
                      "icon": null
                  }
              ]
          }

//Print status to body
  document.getElementById("json").innerHTML = JSON.stringify(data, undefined, 2);
        });
        });
</script>
<pre id="json"></pre>
</body>
</html>

 the output being :


 

{
  "frames": [
    {
      "text": "Server",
      "icon": "i16865"
    },
    {
      "text": "Gamer123",
      "icon": null
    }
  ]
}

 But it does not work. This implies the file HAS to be a json.

Having same problem here. Did they update the JSON format? 

i dont think so as i was able to push a request with curl in that same format... I am very disappointed in the customer / dev support from LaMetric. 


1 person likes this

I have exactly the same problem and I'm upset.

Please solve as soon as possible!

Answer

Hi guys,


UPDATE: fixed has been released


There was an issue with URL validation, the fix is coming soon.

Apologies for the inconvenience.

This is happening to me. My returned string meets the template provided exactly...but I get this error.

Login or Signup to post a comment