{"action":"closed","issue":{"url":"https://api.github.com/repos/impetus-opensource/Kundera/issues/818","labels_url":"https://api.github.com/repos/impetus-opensource/Kundera/issues/818/labels{/name}","comments_url":"https://api.github.com/repos/impetus-opensource/Kundera/issues/818/comments","events_url":"https://api.github.com/repos/impetus-opensource/Kundera/issues/818/events","html_url":"https://github.com/impetus-opensource/Kundera/issues/818","id":122492915,"number":818,"title":"Could you please suggest mapping for given json structure","user":{"login":"anand-singh","id":4903911,"avatar_url":"https://avatars.githubusercontent.com/u/4903911?v=3","gravatar_id":"","url":"https://api.github.com/users/anand-singh","html_url":"https://github.com/anand-singh","followers_url":"https://api.github.com/users/anand-singh/followers","following_url":"https://api.github.com/users/anand-singh/following{/other_user}","gists_url":"https://api.github.com/users/anand-singh/gists{/gist_id}","starred_url":"https://api.github.com/users/anand-singh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anand-singh/subscriptions","organizations_url":"https://api.github.com/users/anand-singh/orgs","repos_url":"https://api.github.com/users/anand-singh/repos","events_url":"https://api.github.com/users/anand-singh/events{/privacy}","received_events_url":"https://api.github.com/users/anand-singh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/impetus-opensource/Kundera/labels/UserResponseAwaited","name":"UserResponseAwaited","color":"009800"}],"state":"closed","locked":false,"assignee":{"login":"devender-yadav","id":8894359,"avatar_url":"https://avatars.githubusercontent.com/u/8894359?v=3","gravatar_id":"","url":"https://api.github.com/users/devender-yadav","html_url":"https://github.com/devender-yadav","followers_url":"https://api.github.com/users/devender-yadav/followers","following_url":"https://api.github.com/users/devender-yadav/following{/other_user}","gists_url":"https://api.github.com/users/devender-yadav/gists{/gist_id}","starred_url":"https://api.github.com/users/devender-yadav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devender-yadav/subscriptions","organizations_url":"https://api.github.com/users/devender-yadav/orgs","repos_url":"https://api.github.com/users/devender-yadav/repos","events_url":"https://api.github.com/users/devender-yadav/events{/privacy}","received_events_url":"https://api.github.com/users/devender-yadav/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-12-16T12:21:06Z","updated_at":"2015-12-20T14:24:30Z","closed_at":"2015-12-20T14:24:30Z","body":"I have below JSON documents in MongoDB and I would like to read it through kundera-mongo but not able to write proper mapping for given dataset. So, please suggest suitable mapping for nested MongoDB documents.\r\n\r\n```\r\n[\r\n\r\n    {\r\n        \"id\":\"0001\",\r\n        \"type\":\"donut\",\r\n        \"name\":\"Cake\",\r\n        \"ppu\":0.55,\r\n        \"image\":{\r\n            \"url\":\"images/0001.jpg\",\r\n            \"width\":200,\r\n            \"height\":200\r\n        },\r\n        \"batters\":{\r\n            \"batter\":[\r\n                {\r\n                    \"id\":\"1001\",\r\n                    \"type\":\"Regular\"\r\n                },\r\n                {\r\n                    \"id\":\"1002\",\r\n                    \"type\":\"Chocolate\",\r\n                    \"style\":\"Regular\"\r\n                }\r\n            ]\r\n        },\r\n        \"topping\":[\r\n            {\r\n                \"id\":\"5001\",\r\n                \"type\":\"None\"\r\n            },\r\n            {\r\n                \"id\":\"5002\",\r\n                \"type\":\"Glazed\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"id\":\"0002\",\r\n        \"type\":\"donut\",\r\n        \"name\":\"Raised\",\r\n        \"ppu\":0.55,\r\n        \"thumbnail\":{\r\n            \"url\":\"images/thumbnails/0001.jpg\",\r\n            \"width\":32,\r\n            \"height\":32\r\n        },\r\n        \"batters\":{\r\n            \"batter\":[\r\n                {\r\n                    \"id\":\"1001\",\r\n                    \"type\":\"Regular\"\r\n                }\r\n            ]\r\n        },\r\n        \"topping\":[\r\n            {\r\n                \"id\":\"5003\",\r\n                \"type\":\"Chocolate\"\r\n            },\r\n            {\r\n                \"id\":\"5004\",\r\n                \"type\":\"Maple\"\r\n            }\r\n        ]\r\n    },\r\n    {\r\n        \"id\":\"0003\",\r\n        \"type\":\"donut\",\r\n        \"name\":\"Old Fashioned\",\r\n        \"ppu\":0.55,\r\n        \"photos\":[\r\n            {\r\n                \"url\":\"images/thumbnails/0001.jpg\"\r\n            },\r\n            {\r\n                \"url\":\"images/thumbnails/0002.jpg\"\r\n            }\r\n        ],\r\n        \"batters\":{\r\n            \"batter\":[\r\n                {\r\n                    \"id\":\"1002\",\r\n                    \"type\":\"Chocolate\"\r\n                }\r\n            ]\r\n        },\r\n        \"topping\":[\r\n            {\r\n                \"id\":\"5001\",\r\n                \"style\":\"Regular\"\r\n            },\r\n            {\r\n                \"id\":\"5002\",\r\n                \"type\":\"Glazed\"\r\n            }\r\n        ]\r\n    }\r\n\r\n]\r\n```\r\n\r\nThanks,\r\nAnand"}}