use angulars.toJson in the angular version of the client