mirror of
https://github.com/json-iterator/go.git
synced 2025-04-23 11:37:32 +02:00
add array to int
This commit is contained in:
parent
402c6c79e2
commit
d8dbf14af4
@ -26,6 +26,10 @@ var intConvertMap = map[string]int{
|
|||||||
`"123true"`: 123,
|
`"123true"`: 123,
|
||||||
`"1.2332e6"`: 1,
|
`"1.2332e6"`: 1,
|
||||||
`""`: 0,
|
`""`: 0,
|
||||||
|
"+": 0,
|
||||||
|
"-": 0,
|
||||||
|
"[]": 0,
|
||||||
|
"[1,2]": 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_read_any_to_int(t *testing.T) {
|
func Test_read_any_to_int(t *testing.T) {
|
||||||
@ -67,6 +71,10 @@ var uintConvertMap = map[string]int{
|
|||||||
`"123true"`: 123,
|
`"123true"`: 123,
|
||||||
`"1.2332e6"`: 1,
|
`"1.2332e6"`: 1,
|
||||||
`""`: 0,
|
`""`: 0,
|
||||||
|
"+": 0,
|
||||||
|
"-": 0,
|
||||||
|
"[]": 0,
|
||||||
|
"[1,2]": 1,
|
||||||
// TODO need to solve
|
// TODO need to solve
|
||||||
//"-1.1": 1,
|
//"-1.1": 1,
|
||||||
//"-321.1": 321,
|
//"-321.1": 321,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user