Format received json for the client