Commit ebbdeae
committed
Fix double support: Parse actual numeric values instead of returning hardcoded 0/0.0
- Fixed MapTypeAdapter.read() in GsonUtil.kt to parse and return actual numeric values
- Previously all JSON numbers were replaced with hardcoded 0 (int) or 0.0 (double)
- Now correctly parses integers to Long and doubles to Double with proper error handling
- Added .intellijPlatform to .gitignore as recommended by build system
Fixes double support functionality in JSON to Dart bean conversion.1 parent 86981ef commit ebbdeae
File tree
2 files changed
+13
-4
lines changed- src/main/kotlin/com/github/zhangruiyu/flutterjsonbeanfactory/utils
2 files changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | | - | |
127 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
| |||
0 commit comments