In this line https://github.com/vivkin/gason/blob/master/src/gason.h#L33
on 32 bit systems If payload's highest bit is set eg ( 0x8015b678 ) then (uint64_t)payload == 0xffffffff8015b678 so the payload bits overwrites the tags and nan_mask.
masking the result of ((uint64_t)payload) solves the issue.
ival = JSON_VALUE_NAN_MASK | ((uint64_t)tag << JSON_VALUE_TAG_SHIFT) | (((uint64_t)payload)&JSON_VALUE_PAYLOAD_MASK)
In this line https://github.com/vivkin/gason/blob/master/src/gason.h#L33 on 32 bit systems If payload's highest bit is set eg ( 0x8015b678 ) then (uint64_t)payload == 0xffffffff8015b678 so the payload bits overwrites the tags and nan_mask.
masking the result of ((uint64_t)payload) solves the issue. ival = JSON_VALUE_NAN_MASK | ((uint64_t)tag << JSON_VALUE_TAG_SHIFT) | (((uint64_t)payload)&JSON_VALUE_PAYLOAD_MASK)
I tested this on win32 and android (32bit).