something wrong with decode json kv.value
hi, I use the newest version but I got the following issue:
2021/03/24 09:25:19 [error] 6112#54059: *13 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/etcd/v3.lua:487: attempt to index field 'serializer' (a nil value)
I believe serializer default is json as the doc mention in v3.md. Nvm, I set it to json manually, but I got error message instead , I believe is the same issue.
2021/03/24 09:20:19 [error] 5976#50240: *13 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/etcd/v3.lua:487: attempt to call field 'deserialize' (a nil value)
Could you help look into this? Thanks in advance
I just figure this out by looking into the source code, require this when new etcd instance, not sure is the correct way to handle this.
Also, the option here maybe need a little bit ajust or give a brief example would be much better.
@Yiyiyimu Would you take a look at this issue? Thanks!
Hi @findmark sorry I lost track on this issue, hope it's not too late 😬
Actually, the accepted option for serializer is json and raw. As you could find in the test code
https://github.com/api7/lua-resty-etcd/blob/16a57331cb5557aa15a06a8533696606d1fcc5e6/t/v3/serializer.t#L58-L61
And yes the documentation is a bit confusing 🤦 If you got time, welcome draft a PR to refine it~