Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Twitterのjsonをgsonで解析し、
それらのスキーマには、「protected」と呼ばれる変数が含まれています。明らかな理由で、protectedという変数を作成できません...
私の解決策は、「protected」で置換を実行することです:「bProtected」のようなもので:
誰かがより良い解決策を考えることができますか?
@SerializedNameGSONでは、トリックを使用できます。
@SerializedName
class SomeYourDeserializationClass { ... @SerializedName("protected") public String myProtected; ... }