### Question:
SphereJsonUtils { public static String toJsonString(final Object value) { return executing(() -> objectMapper.writeValueAsString(value)); } private  SphereJsonUtils(); static ObjectMapper newObjectMapper(); static ObjectMapper configureObjectMapper(final ObjectMapper objectMapper); static String toJsonString(final Object value); static String toPrettyJsonString(final Object value); static JsonNode toJsonNode(final Object value); static JsonNode parse(final String jsonAsString); static JsonNode parse(final byte[] jsonAsBytes); static String prettyPrint(final String json); static String prettyPrint(final JsonNode jsonNode); static T readObjectFromResource(final String resourcePath, final TypeReference<T> typeReference); static T readObjectFromResource(final String resourcePath, final JavaType javaType); static T readObjectFromResource(final String resourcePath, final Class<T> clazz); static T readObject(final String jsonAsString, final TypeReference<T> typeReference); static T readObject(final String jsonAsString, final Class<T> clazz); static T readObject(final JsonNode jsonNode, final TypeReference<T> typeReference); static T readObject(final JsonNode jsonNode, final Class<T> clazz); static T readObject(final JsonNode jsonNode, final JavaType javaType); static T readObject(final byte[] jsonAsBytes, final TypeReference<T> typeReference); static T readObject(final byte[] jsonAsBytes, final JavaType javaType); static ObjectNode newObjectNode(); static JavaType convertToJavaType(final TypeReference<T> typeReference); static JavaType createCustomObjectJavaType(Class<?> customObject, Class<?> param); static JavaType convertToJavaType(final Class<?> clazz);  }### Answer:
@Test public void serializeFullLocale() { final String jsonString = SphereJsonUtils.toJsonString(Locale.US); assertThat(jsonString).isEqualTo("\"en-US\""); }
@Test public void toJsonString() throws Exception { final LocalizedString value = LocalizedString.of(ENGLISH, "dog food", GERMAN, "Hundefutter"); assertThat(SphereJsonUtils.toJsonString(value)) .isEqualTo("{\"en\":\"dog food\",\"de\":\"Hundefutter\"}"); }
@Test public void serializeLocale() { final String jsonString = SphereJsonUtils.toJsonString(Locale.ENGLISH); assertThat(jsonString).isEqualTo("\"en\""); }