-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 <rhegde@cls-bank.com>
- Loading branch information
rhegde
authored and
Chris Elder
committed
Mar 30, 2017
1 parent
561443e
commit 1779125
Showing
5 changed files
with
65 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters