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
[FAB-2911]Fix JSON-unmarshal for Generic Interface
GOLANG JSON package stores integer in float format.
In fabric Couch DB state ledger code performs a json unmarshalling
on the data wrapper using generic interface data-type.
For JSON document stored in the state ledger that has integer
with digit size >=7; now gets unmarshalled with a E (float) notation which
is eventually passed to the user chain-code upon for eg. shim GetState API.
Unmarshalling at the user-chaincode level result in an error indicating
float cannot be converted to integer type.
To fix this issue, it is neccessary to use NewDecoder API of JSON package
and retains the number representation in such case.
Change-Id: I650cf88dacff84e5e9a185bfa44984a2814488a4
Signed-off-by: rhegde <[email protected]>
0 commit comments