{"action":"created","issue":{"url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/120","labels_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/120/comments","events_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/120/events","html_url":"https://github.com/volkszaehler/vzlogger/issues/120","id":57222349,"number":120,"title":"Suggestion: JSON logger","user":{"login":"andig","id":184815,"avatar_url":"https://avatars.githubusercontent.com/u/184815?v=3","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/volkszaehler/vzlogger/labels/Enhancement","name":"Enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-10T19:21:50Z","updated_at":"2015-02-23T15:46:44Z","closed_at":null,"body":"We already have a log file parser which is essentially:\r\n\r\n  - a file transport to read the file line by line plus\r\n  - a pattern matcher for that line (which seems to be broken but alas)\r\n\r\nA JSON logger would consist of:\r\n\r\n  - an HTTP(S) transport\r\n  - a JSON parser\r\n  - a search expression\r\n\r\nLogfile and JSON parser might/should use the same infrastructure and config settings in that regard.\r\n\r\nFeatures I would be looking for are:\r\n\r\n   - search expression for target value:\r\n     - properties: `parent.child`\r\n     - arrays: `parent[1]`\r\n     - arrays with access from end: `parent[-1]`\r\n     - child property matching for arrays: parent.channels[@uuid=abc]\r\n  - option to skip duplicates if found value == last value\r\n\r\nThe latter option might also make general sense for other meters.\r\n\r\nWhat do you think?\r\n"},"comment":{"url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/comments/75568121","html_url":"https://github.com/volkszaehler/vzlogger/issues/120#issuecomment-75568121","issue_url":"https://api.github.com/repos/volkszaehler/vzlogger/issues/120","id":75568121,"user":{"login":"r00t-","id":2834981,"avatar_url":"https://avatars.githubusercontent.com/u/2834981?v=3","gravatar_id":"","url":"https://api.github.com/users/r00t-","html_url":"https://github.com/r00t-","followers_url":"https://api.github.com/users/r00t-/followers","following_url":"https://api.github.com/users/r00t-/following{/other_user}","gists_url":"https://api.github.com/users/r00t-/gists{/gist_id}","starred_url":"https://api.github.com/users/r00t-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r00t-/subscriptions","organizations_url":"https://api.github.com/users/r00t-/orgs","repos_url":"https://api.github.com/users/r00t-/repos","events_url":"https://api.github.com/users/r00t-/events{/privacy}","received_events_url":"https://api.github.com/users/r00t-/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T15:46:44Z","updated_at":"2015-02-23T15:46:44Z","body":"maybe the load-data-from-http part could be abstracted to also parse formats other than json?\r\ni.e. xml/html via xpath, or plain regular expressions.\r\nfor example to replace \"htmlvz\": http://wiki.volkszaehler.org/howto/wechselrichter_kostal_piko"}}