“Unexpected Character” on Decoding JSON

前端 未结 4 1502
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-03 04:21

The following is the code:

    static TodoState fromJson(json) {
          JsonCodec codec = new JsonCodec();
            List data = codec.decod         


        
4条回答
  •  时光说笑
    2021-01-03 04:59

    I don't know if that's the case, but I got a similar error when me JSON looks like this

    [ { ... }, ]

    and not like this

    [ { ... } ]

    The comma was causing the issue.

提交回复
热议问题