Skip to content

Commit 1e35c13

Browse files
committed
Update serializer to use any serializer_opts option passed, which defaults to JSON_STATE.
1 parent a690efb commit 1e35c13

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/json/ld/api.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,10 @@ def self.load_html(input, url:,
827827
# other arguments that may be passed for some specific implementation.
828828
# @param [Hash<Symbol, Object>] options
829829
# options passed from the invoking context.
830+
# @option options [Object] :serializer_opts (JSON_STATE)
830831
def self.serializer(object, *args, **options)
831-
MultiJson.dump(object, JSON_STATE)
832+
serializer_opts = options.fetch(:serializer_opts, JSON_STATE)
833+
MultiJson.dump(object, serializer_opts)
832834
end
833835

834836
##

0 commit comments

Comments
 (0)