Yeah, but I'd like to avoid making a whole JSON li...
# coroutines
m
Yeah, but I'd like to avoid making a whole JSON library suspend 😄 And try…finally will make the logic really complex because you cannot wrap a code into a lambda anymore and it will affect plenty of functions 😞
l
Are you writing this JSON library? If so, don't kotlinx.serialization or Moshi suit your needs?
m
Yes, it's my own and it was there before Moshi and Kotlinx 🙂
l
Is it open source? If so, you could permalink a line of code here so I can see your particular case and give a more relevant answer
m
The library is OSS (https://github.com/fluidsonic/fluid-json) but the use case is private code. Anyway I've worked around the issue by not using the affected lambda-accepting method since the
suspend
case was only in one occasion.
👍 1
well no, the use case is also OSS 🤔 anyway, nevermind 🙂
😅 1
l
Wow, you did a good job for the documentation!
m
Thanks, on the other hand there is not a single KDoc comment yet 😅