Better json detection