You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on the below JSON, the code generation is broken. It generates Kotlin constructors with duplicated commas, it adds trailing commas, etc.
For example, this is some of the code created:
data class Author(
val name: String, // <-- trailing comma is invalid code
)
data class Image(
val height: Int, , // <-- extra comma here is invalid code
val url: String,
val width: Int
)
This seemed to be caused by the fields prefixed with @ signs.
This is done based on the 3.2.0 plugin using this JSON:
{
"recipeInstructions": [
"Cook pasta in a pan of boiling salted water according to packet instructions. Drain, reserving 1 cup (250ml) liquid.",
"Return pasta and liquid to pan with pecorino, pepper and half the butter. Stir to coat and keep warm.",
"Melt remaining 40g butter in a frypan over high heat. Add mushrooms and sage.",
"Cook, tossing, for 3-4 minutes until golden. Season and serve with pasta."
],
"recipeIngredient": [
"400g spaghetti (we used Woolworths Macro organic spaghetti)",
"3 cups (240g) finely grated pecorino, plus extra to serve",
"1 tbs crushed black peppercorns",
"80g unsalted butter",
"500g mixed mushrooms (such as Swiss brown and chestnut)",
"1\/3 cup sage leaves"
],
"recipeCuisine": "italian",
"cookingMethod": null,
"cookTime": "PT0S",
"prepTime": "PT0S",
"totalTime": null,
"recipeYield": 4,
"nutrition": {
"calories": null,
"fatContent": null,
"saturatedFatContent": null,
"carbohydrateContent": null,
"sugarContent": null,
"fibreContent": null,
"proteinContent": null,
"cholesterolContent": null,
"sodiumContent": null,
"@context": "http:\/\/schema.org",
"@type": "NutritionInformation"
},
"aggregateRating": {},
"recipeCategory": "dinner, main",
"keywords": "Mushrooms, sage, butter, spaghetti, simple pasta, Italian flavours, Italian food, Italian cooking, Italian recipes, five ingredient pasta, 5 ingredient pasta, Phoebe Wood, mushroom pasta, cacio e pepe pasta, sage mushrooms, crispy sage, Vegetarian, Easy vegetarian, Vegetarian recipes, Vegetarian dinner, Vegetable mains, Meat free Monday, Meat-free Monday, Meat free mains, portobello mushrooms, roasted mushrooms, Fast food, Quick meals, Easy dinner, Easy recipes, Easy cooking",
"name": "Cacio e pepe with sage mushrooms",
"description": "Need a break from meat tonight? This simple vegetarian pasta is a winner. With just five ingredients, it's the perfect mid-week recipe to add to your weekly meal plan, yum!",
"datePublished": "2016-06-10",
"dateCreated": "2016-06-17",
"mainEntityOfPage": null,
"dateModified": "2019-01-23",
"author": {
"name": "Phoebe Wood",
"@context": "http:\/\/schema.org",
"@type": "person"
},
"publisher": {
"name": null,
"logo": null,
"@context": "http:\/\/schema.org",
"@type": "Organization"
},
"image": {
"url": "https:\/\/img.delicious.com.au\/UvMnowlO\/del\/2016\/05\/cacio-e-pepe-with-sage-mushrooms-30645-1.jpg",
"width": 1500,
"height": 1000,
"@context": "http:\/\/schema.org",
"@type": "ImageObject"
},
"video": {
"name": "5348771529001-5981831265001",
"description": "5348771529001-5981831265001",
"thumbnailUrl": "https:\/\/img.delicious.com.au\/UvMnowlO\/del\/2016\/05\/cacio-e-pepe-with-sage-mushrooms-30645-1.jpg",
"uploadDate": "2019-01-23",
"url": "https:\/\/resources.newscdn.com.au\/cs\/video\/vjs\/stable\/build\/index.html?id=5348771529001-5981831265001&=domain=del",
"@context": "http:\/\/schema.org",
"@type": "VideoObject"
},
"@context": "http:\/\/schema.org",
"@type": "Recipe"
}
The text was updated successfully, but these errors were encountered:
Hi all,
Based on the below JSON, the code generation is broken. It generates Kotlin constructors with duplicated commas, it adds trailing commas, etc.
For example, this is some of the code created:
This seemed to be caused by the fields prefixed with @ signs.
This is done based on the 3.2.0 plugin using this JSON:
The text was updated successfully, but these errors were encountered: