holgerbrandl / krangl

krangl is a {K}otlin DSL for data w{rangl}ing
MIT License
560 stars 50 forks source link

fromJsonString() recognizes Int instead Long from Json Array #109

Closed viktorbilousov closed 3 years ago

viktorbilousov commented 3 years ago

This works fine:

val str2 = "{\"test\":1612985220914}"
val df2: DataFrame = DataFrame.fromJsonString(str2)
println(df2.toString())

output:

A DataFrame: 1 x 2
 test _id
1 1612985220914 test

But it doesnt work with Json Array:

val str1 = "[{\"test\":1612985220914},{\"test\":1612985220914}]"
 val df: DataFrame = DataFrame.fromJsonString(str1)
 println(df.toString())

output:

A DataFrame: 2 x 1
 test
1  -1922482382 
2 -1922482382
holgerbrandl commented 3 years ago

patch included in v0.15.3