{"action":"closed","issue":{"url":"https://api.github.com/repos/influxdata/whisper-migrator/issues/5","repository_url":"https://api.github.com/repos/influxdata/whisper-migrator","labels_url":"https://api.github.com/repos/influxdata/whisper-migrator/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/whisper-migrator/issues/5/comments","events_url":"https://api.github.com/repos/influxdata/whisper-migrator/issues/5/events","html_url":"https://github.com/influxdata/whisper-migrator/issues/5","id":135057039,"number":5,"title":"Detection of malformed json","user":{"login":"olref","id":1318513,"avatar_url":"https://avatars.githubusercontent.com/u/1318513?v=3","gravatar_id":"","url":"https://api.github.com/users/olref","html_url":"https://github.com/olref","followers_url":"https://api.github.com/users/olref/followers","following_url":"https://api.github.com/users/olref/following{/other_user}","gists_url":"https://api.github.com/users/olref/gists{/gist_id}","starred_url":"https://api.github.com/users/olref/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olref/subscriptions","organizations_url":"https://api.github.com/users/olref/orgs","repos_url":"https://api.github.com/users/olref/repos","events_url":"https://api.github.com/users/olref/events{/privacy}","received_events_url":"https://api.github.com/users/olref/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-20T10:03:53Z","updated_at":"2016-03-06T05:14:49Z","closed_at":"2016-03-06T05:14:49Z","body":"When the migration_config.json file is not valid (for example you add a comma at a wrong place ;-) )\r\nthere are no warning from the tool.\r\n\r\nExample of a file that caused me a problem (it took me some minutes to find why migrator doesn't understand my pattern) :\r\n```\r\n[\r\n  {\r\n    \"pattern\": \"TEST.2013.#TEXT1.#TEXT2\",\r\n    \"measurement\": \"#TEXT2\",\r\n    \"tags\": [\r\n      {\r\n        \"tagkey\": \"host\",\r\n        \"tagvalue\": \"#TEXT1\"\r\n      }\r\n    ],\r\n    \"field\": \"value\"\r\n  },\r\n]\r\n```\r\n\r\nIt could be a great help, if the migration tool return a warning when it can't parse the json.\r\n\r\nPerhaps is it possible to get error returned by json.Unmarshal and display it as a warning (into the function ReadTagConfig)\r\n\r\n```\r\nerr = json.Unmarshal(raw, &migrationData.tagConfigs)\r\nif err != nil {\r\n  fmt.Printf(\"Can not parse migration_config.json : %s\", err)\r\n}\r\n```\r\n\r\nThanks for this tool, it will be very useful !"}}