Results 1 to 40 of 160

Thread: VB6 - JsonBag, Another JSON Parser/Generator

Hybrid View

  1. #1
    Addicted Member beic's Avatar
    Join Date
    Jun 2012
    Posts
    176

    Question Re: VB6 - JsonBag, Another JSON Parser/Generator

    Hi there,

    I'm trying to parse Json data but without any luck with v1.8 on Windows 7 64-bit:

    Code:
    {
      "ESP8266": {
        "NTC": {
          "temperature": 18.03633
        },
        "DHT11": {
          "temperature": 19,
          "humidity": 59
        },
        "SHT30": {
          "temperature": 19.48043,
          "humidity": 63.17846
        },
        "BMP180": {
          "temperature": 19.7,
          "pressure": 997.52
        },
        "WU": {
          "temperature": 1.6,
          "humidity": 98,
          "pressure": 1006
        }
      }
    }
    I'm unable to get any readings by:

    Code:
    Debug.Print objJson.Item("ESP8266").Item("NTC").Item("temperature")
    Also got some error saying:
    Code:
    Requested Item by key doesn't exist (case mismatch?)
    But, if I check the feeded JSON Object, it's clear reading.

    Code:
    Debug.Print objJson.JSON
    Code:
    {"ESP8266":{"NTC":{"temperature":18.03633},"DHT11":{"temperature":19,"humidity":58},"SHT30":{"temperature":19.73144,"humidity":62.63981},"BMP180":{"temperature":20.1,"pressure":997.25},"WU":{"temperature":1.6,"humidity":97,"pressure":1006}}}
    So, I don't know what I'm doing wrong.

    Please advise!

    Kind regards,
    Viktor
    Last edited by beic; Dec 9th, 2017 at 03:56 AM. Reason: typo

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width