Skip to content

Commit

Permalink
ensure compact json generation on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
emiltin committed Sep 6, 2024
1 parent 7753328 commit 2f1d38c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/rsmp/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,14 @@ def valid?
end

def generate_json
@json = JSON.generate @attributes
# ensure compact format on all platforms
options = {
array_nl: nil,
object_nl: nil,
space_before: nil,
space: nil
}
@json = JSON.generate @attributes, options
end

end
Expand Down

0 comments on commit 2f1d38c

Please sign in to comment.