{"action":"closed","issue":{"url":"https://api.github.com/repos/XeroAPI/xero-node/issues/170","repository_url":"https://api.github.com/repos/XeroAPI/xero-node","labels_url":"https://api.github.com/repos/XeroAPI/xero-node/issues/170/labels{/name}","comments_url":"https://api.github.com/repos/XeroAPI/xero-node/issues/170/comments","events_url":"https://api.github.com/repos/XeroAPI/xero-node/issues/170/events","html_url":"https://github.com/XeroAPI/xero-node/issues/170","id":294560327,"number":170,"title":"TrackingCategorySchema issue and way to convert Journals to Json.","user":{"login":"jin-chong","id":8456612,"avatar_url":"https://avatars3.githubusercontent.com/u/8456612?v=4","gravatar_id":"","url":"https://api.github.com/users/jin-chong","html_url":"https://github.com/jin-chong","followers_url":"https://api.github.com/users/jin-chong/followers","following_url":"https://api.github.com/users/jin-chong/following{/other_user}","gists_url":"https://api.github.com/users/jin-chong/gists{/gist_id}","starred_url":"https://api.github.com/users/jin-chong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jin-chong/subscriptions","organizations_url":"https://api.github.com/users/jin-chong/orgs","repos_url":"https://api.github.com/users/jin-chong/repos","events_url":"https://api.github.com/users/jin-chong/events{/privacy}","received_events_url":"https://api.github.com/users/jin-chong/received_events","type":"User","site_admin":false},"labels":[{"id":477085380,"url":"https://api.github.com/repos/XeroAPI/xero-node/labels/bug%20reported%20(?)","name":"bug reported (?)","color":"9054c4","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-05T22:10:20Z","updated_at":"2018-05-05T01:47:25Z","closed_at":"2018-05-05T01:47:25Z","author_association":"NONE","body":"Hi,\r\nI'm using ver 2.17.\r\nI got the Journals from https://api.xero.com/api.xro/2.0/journals.\r\nBy express js, when I try to send back Journals as Json to client, I found some issues like below:\r\n  1. When I call express's 'res.json(Journals);', it only serializes some parts of properties.\r\n  2. 'JSON.stringify(Journals)' has same issue.\r\n  3. 'JSON.stringify( Journals.map( (j)=> j.toObject() )' throws exception such as ' no _super' at joural.js:46\r\n  4. finally I did like below:\r\n  JSON.stringify( Journals.map( (j)=>j._schemaToObject({all: true}) )\r\n  It looks OK but it misses some properties at TrackingCategories ( property of JournalLine).  Even if the object has 'Option' and 'TrackingOptionID' but it fails to serialize these to JSON.\r\n  I found TrackingCategorySchema (trackingcategory.js: 5) does not have the definition of these properties.\r\n  I could make it work once I add these properties into TrackingCategorySchema.\r\n  I feel like TrackingCategorySchema should look like TrackingOptionsSchema at shared.js: 83\r\n\r\nCan you have a look if TrackingCategorySchema definition is correct?\r\nAnd what is the best way to convert the array of Schema objects to Json or normal object?\r\n\r\nThanks,\r\nJin"}}
{"actor":{"display_login":"philals"}}