Re:Tinygo: LLVM-based Go compiler for microcontrollers, WASM...
by maxmcd on Monday June 06, 2022 @12:17PM
(#31642361)
I don't think "encoding/json" is fully working yet.
Seems to be importable now, although tests are not passing. See supported packages here: https://tinygo.org/docs/reference/lang-support/stdlib/
Definitely still a ways to go before the full stdlib is usable.
Looks like your code still fails at runtime with the error:
panic: unimplemented: (reflect.Type).NumMethod()
Tested here: https://play.tinygo.org/
I'm curious what kind of text parsing you do. I ended up rolling with valyala/fastjson, but that's very much not what I was imagining. Lots of existing libraries don't work either, and finding out what does and what doesn't is pain. Is there some trick to working with it?