new JSON_ () new JSON_ (options)
320640
function JSON_ () {
  var self = this

  self.klass = JSON_;
  self.klass.super_.apply(self, arguments);

  self.engine = JSON;
  self.binary = false;
}
20816
def __json_hooks(json_object):
        
        json_object = Mastodon.__json_strnum_to_bignum(json_object)        
        json_object = Mastodon.__json_date_parse(json_object)
        json_object = Mastodon.__json_truefalse_parse(json_object)
        json_object = Mastodon.__json_allow_dict_attrs(json_object)
        return json_object
749228
def from_json(cls, json_dump):
        
        context = cls()
        if json_dump is None:
            return None
        ctxt = json.loads(json_dump)
        for k in ctxt:
            context[k] = ctxt[k]
        return context
1158669
def new
      @snippet = Snippet.new

      respond_to do |format|
        format.html # new.html.erb
        format.json { render json: @snippet }
      end
    end
463379
def client_json(options)
      {
        client: {
          username: options[:username],
          name: options[:name],
          email: options[:email],
          public_key: File.read(options[:public_key])
        }
      }.to_json
    end
1251310
public function remakeJson()
    {
        $json = json_encode([
            'last_remote_check' => (!is_null($this->lastRemoteCheck) ? $this->lastRemoteCheck->timestamp : null),
            'hooks'             => $this->hooks(),
        ], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);

        file_put_contents(base_path('hooks/hooks.json'), $json);
    }
226695
def as_json_partial(options = {})
      options ||= {}
      if options[:properties] && !all_json_properties.member?(options[:properties])
        fail ArgumentError.new("Unknown properties option: #{options[:properties]}")
      end
      # partial, unmaterialized JSON
      keys, partial_json = self.class.materialize_json({
        properties: :short, is_top_level_json: true, version: Mongoid::CachedJson.config.default_version
      }.merge(options), object: self)
      [keys, partial_json]
    end
213038
function(options, jsonData) {

            //console.log(jsonData);
            var self = this;
            // remove the existing one.
            $('#' + self.attrId).empty();

            // need merge the options with default options.
            self.options = $.extend({}, defaultOptions, options);
            self.jsonData = jsonData;
            self.init();
        }
906204
def as_json(self):
        # type: () -> dict
        
        new_json = dict(
            vtype=self.vtype,
            config=self._config
        )

        if self.on_valid:
            new_json['config']['on_valid'] = [effect.as_json() for effect in self.on_valid]
        if self.on_invalid:
            new_json['config']['on_invalid'] = [effect.as_json() for effect in self.on_invalid]

        self._json = new_json
        return self._json
561611
private function create_json() {
		$packages = $this->list_directory( $this->packages_dir );
		$arr      = array();

		foreach ( $packages as $package ) {
			foreach ( $this->translations as $translation ) {
				if ( false !== stripos( $package, $translation ) ) {
					$locale                       = ltrim( strrchr( $translation, '-' ), '-' );
					$arr[ $locale ]['slug']       = stristr( $translation, strrchr( $translation, '-' ), true );
					$arr[ $locale ]['language']   = $locale;
					$arr[ $locale ]['updated']    = $this->get_po_revision( $translation . '.po' );
					$arr[ $locale ]['package']    = '/packages/' . $package;
					$arr[ $locale ]['autoupdate'] = '1';
				}
			}
		}

		file_put_contents( $this->root_dir . '/language-pack.json', json_encode( $arr ) );
		printf( "\n<br>" . 'language-pack.json created.' . "\n<br>" );
	}
12971
def json_api_call(req_function):
    
    @wraps(req_function)
    def newreq(request, *args, **kwargs):
        outp = req_function(request, *args, **kwargs)
        if issubclass(outp.__class__, HttpResponse):
            return outp
        else:
            return '%s' % json.dumps(outp, cls=LazyEncoder)
    return string_to_response("application/json")(newreq)
1241028
def new
      @placement = Placement.new
  
      respond_to do |format|
        format.html # new.html.erb
        format.json { render :json => @placement }
      end
    end
890438
def render_json(json, options = {})
      # Setup data from options
      self.status       = options[:status] if options[:status]
      self.content_type = options[:content_type] if options[:content_type]
      options = options.slice(*RENDERING_OPTIONS)
      # Don't convert raw strings to JSON.
      json = encode_to_json(json) unless json.respond_to?(:to_str)
      # Encode the object to json.
      self.status        ||= :ok
      self.content_type  ||= Mime::JSON
      self.response_body   = json
      headers['Content-Length'] = Rack::Utils.bytesize(json).to_s
    end
7115
def json_expand(json_op):
    
    if type(json_op) == dict and 'json' in json_op:
        return update_in(json_op, ['json'], safe_json_loads)

    return json_op
1328387
def to_json(self, *args, **kwargs):
        
        return json.dumps(self.serialized, *args, **kwargs)
1212295
def json(self, json_string=None):
        
        if json_string is not None:
            return self.__init__(loads(json_string))
        dump = self
        if isinstance(self, HAR.log):
            dump = {"log": dump}
        return dumps(dump, default=lambda x: dict(x))
489588
def to_json
      new_json = JSON.pretty_generate(@data)
      # nuke empty lines
      new_json = new_json.split("\n").reject(&:empty?).join("\n") + "\n"
      new_json
    end