@Bean @Scope("prototype") Gson vnfmGson() { return new GsonBuilder() .setPrettyPrinting() .registerTypeAdapter(NFVMessage.class, new VnfmGsonDeserializerNFVMessage()) .registerTypeAdapter(BaseVimInstance.class, new NfvoGsonDeserializerVimInstance()) .registerTypeAdapter(BaseVimInstance.class, new NfvoGsonSerializerVimInstance()) .create(); } }
@Bean @Scope("prototype") Gson gson() { return new GsonBuilder() .setPrettyPrinting() .registerTypeAdapter(NFVMessage.class, new NfvoGsonDeserializerNFVMessage()) .registerTypeAdapter(BaseVimInstance.class, new NfvoGsonDeserializerVimInstance()) .registerTypeAdapter(BaseVimInstance.class, new NfvoGsonSerializerVimInstance()) .registerTypeAdapter(OAuth2AccessToken.class, new GsonSerializerOAuth2AccessToken()) .create(); } }
builder.registerTypeAdapter(BaseVimInstance.class, new NfvoGsonDeserializerVimInstance()); builder.registerTypeAdapter(BaseVimInstance.class, new NfvoGsonSerializerVimInstance()); this.mapper = builder.setPrettyPrinting().create();
builder.registerTypeAdapter(BaseVimInstance.class, new NfvoGsonDeserializerVimInstance()); builder.registerTypeAdapter(BaseVimInstance.class, new NfvoGsonSerializerVimInstance()); this.mapper = builder.setPrettyPrinting().create();