{"action":"created","issue":{"url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/3","repository_url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb","labels_url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/3/comments","events_url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/3/events","html_url":"https://github.com/DataReply/kafka-connect-mongodb/issues/3","id":145234539,"number":3,"title":"Is there a way to prevent the JSON structure that is pulled from mongo from being destroyed?","user":{"login":"grindthemall","id":11562924,"avatar_url":"https://avatars.githubusercontent.com/u/11562924?v=3","gravatar_id":"","url":"https://api.github.com/users/grindthemall","html_url":"https://github.com/grindthemall","followers_url":"https://api.github.com/users/grindthemall/followers","following_url":"https://api.github.com/users/grindthemall/following{/other_user}","gists_url":"https://api.github.com/users/grindthemall/gists{/gist_id}","starred_url":"https://api.github.com/users/grindthemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grindthemall/subscriptions","organizations_url":"https://api.github.com/users/grindthemall/orgs","repos_url":"https://api.github.com/users/grindthemall/repos","events_url":"https://api.github.com/users/grindthemall/events{/privacy}","received_events_url":"https://api.github.com/users/grindthemall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-01T17:15:55Z","updated_at":"2016-04-01T22:45:09Z","closed_at":null,"body":"Ok, so I love the connector - it makes getting data from Mongo to Kafka easy, however when the data gets pulled from mongo, it loses its own JSON structure.  Is there a way to prevent this from happening?\r\n\r\nExample:\r\nMy JSON looks like this in Mongo:\r\n\r\n```\r\n{ \r\n   \"_id\": \"56feaa424f1249736af0ba4f\",\r\n   \"ts\":\"Thu Mar 31 09:00:00 PDT 2016\",\r\n   \"type\":\"hrlyEvtLvls\",\r\n   \"events\": [{\r\n                     \"TechDump\":4,\r\n                     \"Reboot\":174,\r\n                     \"FatalError\":0\r\n                  }]\r\n}\r\n```\r\n\r\nHowever when I retrieve it from Kafka this is what it looks like in the payload object:\r\n\r\n`Document{{_id=56feaa424f1249736af0ba4f, ts=Thu Mar 31 09:00:00 PDT 2016, type=hrlyEvtLvls, events=Document{{TechDump=4, Reboot=174, FatalError=0}}}}`\r\n\r\nI don't have an easy way to reprocess the received data back into JSON, so is there some way I can prevent my JSON from being lost in the first place?"},"comment":{"url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/comments/204597136","html_url":"https://github.com/DataReply/kafka-connect-mongodb/issues/3#issuecomment-204597136","issue_url":"https://api.github.com/repos/DataReply/kafka-connect-mongodb/issues/3","id":204597136,"user":{"login":"grindthemall","id":11562924,"avatar_url":"https://avatars.githubusercontent.com/u/11562924?v=3","gravatar_id":"","url":"https://api.github.com/users/grindthemall","html_url":"https://github.com/grindthemall","followers_url":"https://api.github.com/users/grindthemall/followers","following_url":"https://api.github.com/users/grindthemall/following{/other_user}","gists_url":"https://api.github.com/users/grindthemall/gists{/gist_id}","starred_url":"https://api.github.com/users/grindthemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grindthemall/subscriptions","organizations_url":"https://api.github.com/users/grindthemall/orgs","repos_url":"https://api.github.com/users/grindthemall/repos","events_url":"https://api.github.com/users/grindthemall/events{/privacy}","received_events_url":"https://api.github.com/users/grindthemall/received_events","type":"User","site_admin":false},"created_at":"2016-04-01T22:45:09Z","updated_at":"2016-04-01T22:45:09Z","body":"Thanks for the quick reply.\r\n\r\nIf it's easy to maintain the schema of the original message, that would be best.  Many of us using Mongo prefer things to stay in JSON format so we don't need to do ETL every step of the way.  \r\n\r\nEverything else I have running through Kafka is 100% JSON so we can consume it quickly. \r\n\r\nHaving this one (hopefully small) change would be huge for me (and I'd suspect many others)."}}