Fix possible crash related to JSON transfer across the Bridge.

Bug: 68656
Change-Id: I4cf403a23abb2620c83f68b1ef3219115aefea9e