thingsboard / dart_thingsboard_client

ThingsBoard API client library for Dart developers.
BSD 3-Clause "New" or "Revised" License
59 stars 30 forks source link

fixing invalid JSON formatting #37

Open fatihmerickoc opened 1 month ago

fatihmerickoc commented 1 month ago

have changed the way we treat json values in _parseValue method, from now on json values will not be converted into map and then later into string which then results of json values losing the quotes. this is crucial because it makes you work with correct JSON values instead of invalid ones.

from this:

{ 
people: [
    {
      name: Alice,
      age: 30,
      hobbies: [reading, photography]
    },
    {
      name: Charlie,
      age: 35,
      hobbies: [painting, gardening]
    }
  ]
}

to this:

  {
  "people": [
    {
      "name": "Alice",
      "age": 30,
      "hobbies": ["reading", "photography"]
    },
    {
      "name": "Charlie",
      "age": 35,
      "hobbies": ["painting", "gardening"]
    }
  ]
}