Deutsch   English   Français   Italiano  
<la1bjoF2anmU1@mid.individual.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: =?UTF-8?Q?Josef_M=C3=B6llers?= <josef@invalid.invalid>
Newsgroups: comp.lang.c
Subject: Which newsgroup for json parsing?
Date: Wed, 8 May 2024 15:04:56 +0200
Lines: 17
Message-ID: <la1bjoF2anmU1@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net ILy+y+BJh9CWifwx62EyaQX+vTDxXx75steQTF9ix0j+hSHipc
Cancel-Lock: sha1:FiZXS59cFCHX7MC9Euq2oqeRX0I= sha256:7kpweQ+m+URNNZZV/HJruNTorB2Nnz0jBqK2bwzkewM=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
Bytes: 1237

Hi all,

I am trying to parse a json string received through MQTT from a "Shelly 
Plug S", e.g.
{"id":0, "source":"button", "output":true, "apower":0.0, 
"voltage":237.9, "current":0.000, 
"aenergy":{"total":0.000,"by_minute":[0.000,0.000,0.000],"minute_ts":1715172119},"temperature":{"tC":41.1, 
"tF":106.0}}

I am trying to use libjson-glib but I can't figure out what to use as 
the first argument to json_gobject_from_data()!
I am also looking at libjson-c but cannot find any examples that could 
guide me.

Thanks in advance,

Josef