diff --git a/lib/rsmp/message.rb b/lib/rsmp/message.rb index e6eaa37..65d6c2c 100644 --- a/lib/rsmp/message.rb +++ b/lib/rsmp/message.rb @@ -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