Safer Json building