platform: error handling for bad JSON from glaukus

Can now handle incomplete json or non-UTF8 characters.

In reference to b/30596881

Change-Id: I1c51fcfad652445665db4b1dad4f139c5cd5d517
2 files changed