org.eclipse.lsp4j.jsonrpc.json.adapters.EnumTypeAdapter Java Examples
The following examples show how to use
org.eclipse.lsp4j.jsonrpc.json.adapters.EnumTypeAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MessageJsonHandler.java From lsp4j with Eclipse Public License 2.0 | 5 votes |
/** * Create a {@link GsonBuilder} with default settings for parsing JSON-RPC messages. */ public GsonBuilder getDefaultGsonBuilder() { return new GsonBuilder() .registerTypeAdapterFactory(new CollectionTypeAdapter.Factory()) .registerTypeAdapterFactory(new ThrowableTypeAdapter.Factory()) .registerTypeAdapterFactory(new EitherTypeAdapter.Factory()) .registerTypeAdapterFactory(new TupleTypeAdapters.TwoTypeAdapterFactory()) .registerTypeAdapterFactory(new EnumTypeAdapter.Factory()) .registerTypeAdapterFactory(new MessageTypeAdapter.Factory(this)); }
Example #2
Source File: AbstractStaticPropertiesProvider.java From intellij-quarkus with Eclipse Public License 2.0 | 4 votes |
private static Gson createGson() { return new GsonBuilder().registerTypeAdapterFactory(new EnumTypeAdapter.Factory()).create(); }