Last active
April 23, 2018 16:13
-
-
Save premnirmal/284c75231e8d28b4178c80edd5e87448 to your computer and use it in GitHub Desktop.
NutritionalInfo missing annotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.squareup.moshi.Json | |
/** | |
* Class representing a recipe's nutritional information. | |
* The [calories_per_serving] field does not include the correct annotation for Moshi to be able to parse it. | |
*/ | |
data class NutritionalInfoNet( | |
@JvmField | |
var id: String, | |
@JvmField | |
var recipe_id: String, | |
@JvmField | |
@Json(name = "calories-per-serving") // FAIL! | |
var calories_per_serving: String, | |
@JvmField | |
var media: List<AssetNet>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment