private void writeURL ( JsonGenerator jsonGenerator , Object entity ) throws IOException { // It is exactly the same as the 'name' property. jsonGenerator . writeFieldName ( URL ) ; if ( entity instanceof EntitySet ) { jsonGenerator . writeObject ( ( ( EntitySet ) entity ) . getName ( ) ) ; } else { jsonGenerator . writeObject ( ( ( Singleton ) entity ) . getName ( ) ) ; } }
Writes the url of the entity It is a MUST element .