# File lib/json/add/complex.rb, line 16 def as_json(*) { JSON.create_id => self.class.name, 'r' => real, 'i' => imag, } end