Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
NutritionalInfo missing annotation
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
You can’t perform that action at this time.