You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pjsg : i wonder would you like to give me some implementation suggestions and i can add a NULL constant to the module?
form what i've seen so far, the workaround is to json decode '{"a":null}' and use that. but there should be some constant already in the code to act as same, isn't there?
Hmm. The problem is that the null value is actually on a per encoder basis. This feels broken to me and I think that there ought to be a sjson.NULL that has a specific value. I suspect that you need a row like LROT_LUDENTRY(NULL, JSON_NULL) in the block that begins LROT_BEGIN(sjson, NULL, 0). But I'm not quite sure how the JSON_NULL should be defined.
Expected behavior
Decoded null values are represented as "userdata: (nil)", which according doc should be identical to sjson.NULL constant.
Actual behavior
it appears sjson.NULL is missing completely from module exports ;)
Test code
Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.
NodeMCU startup banner
NodeMCU 3.0.0.0
branch: lua53
commit: 6fdfc48eeea5da86db22d2e469cc9d8885f1ae69
release: 3.0.0-release_20211229 +12
release DTS: 202211122042
SSL: false
build type: float
LFS: 0x20000 bytes total capacity
modules: adc,bit,crypto,encoder,file,gpio,i2c,net,node,rtcmem,rtctime,sjson,sntp,spi,tmr,uart,wifi
build 2022-11-20 15:14 powered by Lua 5.3.5 on SDK 3.0.1-dev(fce080e)
Hardware
WeMos D1
The text was updated successfully, but these errors were encountered: