@Override public LocalizedText deserialize(JsonParser p) throws IOException, JsonParseException { String text = null; String locale = null; expectStartObject(p); while (p.getCurrentToken() == JsonToken.FIELD_NAME) { String field = p.getCurrentName(); p.nextToken(); if ("text".equals(field)) { text = StoneSerializers.string().deserialize(p); } else if ("locale".equals(field)) { locale = StoneSerializers.string().deserialize(p); } else { skipValue(p); } } if (text == null) { throw new JsonParseException(p, "Required field \"text\" missing."); } if (locale == null) { throw new JsonParseException(p, "Required field \"locale\" missing."); } LocalizedText value = new LocalizedText(text, locale); expectEndObject(p); return value; } };
appDescription.setApplicationName(new LocalizedText(APPNAME, Locale.ENGLISH)); appDescription.setApplicationUri("urn:localhost:UA:"+SERVER); appDescription.setProductUri("urn:snorre.com:UA:"+SERVER);