Module Kernel
In: lib/json.rb
Kernel dot/m_1_1.png

Methods

j   jj  

Public Instance methods

Outputs objs to STDOUT as JSON strings in the shortest form, that is in one line.

[Source]

     # File lib/json.rb, line 682
682:   def j(*objs)
683:     objs.each do |obj|
684:       puts JSON::unparse(obj)
685:     end
686:     nil
687:   end

Ouputs objs to STDOUT as JSON strings in a pretty format, with indentation and over many lines.

[Source]

     # File lib/json.rb, line 691
691:   def jj(*objs)
692:     objs.each do |obj|
693:       puts JSON::pretty_unparse(obj)
694:     end
695:     nil
696:   end

[Validate]