Inline class can handle `{ "key": value }` JSON.
In my app, i have many apis that require the transfer body in json format with only one element, like { "status": 0 }, { "name": "Sam" }, etc. so I think it would be great to use inline classes to decode them, avoiding a lot of runtime type definitions.
maybe have some option annotations or configs for these kind serializations of inline class?
Sorry, I don't quite get the idea. You mean that you want inline classes to be serializable as regular classes, without any inlining?
Sorry, I don't quite get the idea. You mean that you want inline classes to be serializable as regular classes, without any inlining?
yes, this is exactly what i mean.
Note that this capability would be something in principle format independent (although some formats may not support inline classes as inline at all). A workaround may be to have a wrapper on the serializer that will just change the serialKind on inlines. But this needs to be applied carefully in case of polymorphism (the serialmodule must not return unwrapped serializers/descriptors).