Static fields parsing #1802
Replies: 2 comments
-
Moshi serializes instances and static fields aren't part of instance state. I don't think we'll be adding support for this. What are you trying to do that necessitates the use of static fields? |
Beta Was this translation helpful? Give feedback.
-
When I start my application, I load parameters from a file, including an ApiKey string that can be viewed and changed in the UI. And through a certain number of classes, the JsonEntity in which this ApiKey should be is initialized. And it took a long time to transfer it from my primary class, and I didn’t want to write another reader, so I just did it like this: |
Beta Was this translation helpful? Give feedback.
-
Hey, is there any special reason why static fields are not serialized? Could you please add this, or some annotations for this?
Beta Was this translation helpful? Give feedback.
All reactions