We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f7435f commit 89a8737Copy full SHA for 89a8737
lib/protox/define_message.ex
@@ -1,11 +1,13 @@
1
defmodule Protox.DefineMessage do
2
@moduledoc false
3
4
+ @default_json_library Jason
5
+
6
alias Protox.Field
7
8
def define(messages, opts \\ []) do
9
keep_unknown_fields = Keyword.get(opts, :keep_unknown_fields, true)
- json_library = Keyword.get(opts, :json_library, Jason)
10
+ json_library = Keyword.get(opts, :json_library, @default_json_library)
11
12
for msg = %Protox.Message{} <- messages do
13
fields = Enum.sort(msg.fields, &(&1.tag < &2.tag))
0 commit comments