Parse JSON cookies.

@param {Object} obj
@return {Object}
@public
185340
function JSONCookies (obj) {
  var cookies = Object.keys(obj)
  var key
  var val

  for (var i = 0; i < cookies.length; i++) {
    key = cookies[i]
    val = JSONCookie(obj[key])

    if (val) {
      obj[key] = val
    }
  }

  return obj
}
825742
@Trivial
    private void inject(Object obj, final Object instance, HashMap<Class<?>, InjectionTarget[]> cookies) throws InjectionException {
        if (tc.isDebugEnabled())
            Tr.debug(tc, "inject", "obj --> [" + obj + "]");
        if (cookies.size() == 0) {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "inject", "no injection cookies found");
            return;
        }
        if (tc.isDebugEnabled())
            Tr.debug(tc, "inject", "injection cookies found");

        // Note that 'obj' is a class.
        if (cookies.containsKey(obj)) { // To prevent NPE from the for loop below

            if (instance != null) {
                if (tc.isDebugEnabled())
                    Tr.debug(tc, "inject", "about to inject via managed object --> [" + obj + "]");

                final ManagedObject<?> mo;
                try {
                    mo = getManagedObject(instance);
                    mo.inject(cookies.get(obj), null);// inject callback handler
                } catch (Exception e) {
                    throw new InjectionException(e.getCause());
                }

                if (tc.isDebugEnabled())
                    Tr.debug(tc, "inject", "injected --> [" + obj + "]");
            } else {
                for (InjectionTarget cookie : cookies.get(obj)) {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "inject", "about to inject resource --> [" + cookie + "]");

                    injectionEngine.inject(obj, cookie, null); // inject main class

                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "inject", "injected resource --> [" + cookie + "]");
                }
            }

        } else {
            if (tc.isDebugEnabled())
                Tr.debug(tc, "inject", "cookies does not contains the key --> [" + obj + "]");
        }
    }
123101
public <T> T parse(JsonObject obj, Class<T> clazz) {
        return gson.fromJson(obj, clazz);
    }
20081
private ChannelBuffer serializeJSON(final Object obj) {
    if (query.hasQueryStringParam("jsonp")) {
      return ChannelBuffers.wrappedBuffer(
          JSON.serializeToJSONPBytes(query.getQueryStringParam("jsonp"), 
          obj));
    }
    return ChannelBuffers.wrappedBuffer(JSON.serializeToBytes(obj));
  }
153023
private static Object parseAsObject(String json) {
		if ( StringHelper.isNullOrEmptyString( json ) ) {
			return null;
		}
		Document object = Document.parse( "{ 'json': " + json + "}" );
		return object.get( "json" );
	}
336254
function parse(data) {
  try {
    return JSON.parse(data);
  } catch (e) {
    log('Oops! Some problems parsing this ' + (typeof data === 'undefined' ? 'undefined' : _typeof(data)) + '.', 'error', debug);
  }

  return null;
}
489550
function parseObj (input) {
  try {
    return require(path.resolve(input));
  } catch (e) {
    var str;
    try {
      str = fs.readFileSync(program.obj, 'utf8');
    } catch (e) {
      str = program.obj;
    }
    try {
      return JSON.parse(str);
    } catch (e) {
      return eval('(' + str + ')');
    }
  }
}
1009854
function parseObj(opts) {
    var obj = new Obj();

    Object.keys(opts).forEach(function (key) {
        obj[key] = opts[key];
    });

    return obj;
}
486778
@SuppressWarnings("rawtypes")
    public static Object unpack(Object obj) {
        Object value = obj;
        while (value != null) {
            if (value instanceof Closure) {
                value = ((Closure) value).call();
            } else if (value instanceof Callable) {
                try {
                    value = ((Callable) value).call();
                } catch (Exception e) {
                    throw new RuntimeException(e);
                }
            } else {
                return value;
            }
        }
        return value;
    }
933008
function(obj, target) {
            if (obj == null) {
                return null;
            }
            var r = JSON.parse(JSON.stringify(obj));
            if (!target) {
                return r;
            }

            for (var i in r) {
                target[i] = r[i];
            }
            return target;
        }
978636
function parseAttrs(obj, prefix) {
		var attrs = {},
			regex = new RegExp('^' + prefix + '([A-Z])(.*)');
		for (var key in obj) {
			var match = key.match(regex);
			if (match) {
				var dasherized = (match[1] + match[2].replace(/([A-Z])/g, '-$1')).toLowerCase();
				attrs[dasherized] = obj[key];
			}
		}
		return attrs;
	}
1167530
function(json) {
      var decoder = Parse.Op._opDecoderMap[json.__op];
      if (decoder) {
        return decoder(json);
      } else {
        return undefined;
      }
    }
15720
def pretty_json(obj):
    
    if isinstance(obj, string_types):
        try:
            obj = json.loads(obj)
        except ValueError:
            raise ClientException("`obj` is not a json string")
    json_str = json.dumps(obj, sort_keys=True, indent=2)
    print(highlight(json_str, JsonLexer(), TerminalFormatter()))
600820
public static String toJson(Object obj) {
		ObjectMapper mapper = new ObjectMapper();
		try {
			return mapper.writeValueAsString(obj);
		} catch (IOException e) {
			JK.throww(e);
			return null;
		}
	}
455784
function __toJSONSafe(obj, replacer) {
  if (obj !== Object(obj)) return obj; // primitive value
  if (obj._$visited) return undefined;
  replacer = replacer || __safeReplacer;
  if (obj.toJSON) {
    var newObj = obj.toJSON();
    if (newObj !== Object(newObj)) return newObj; // primitive value
    if (newObj !== obj) return __toJSONSafe(newObj, replacer);
    // toJSON returned the object unchanged.
    obj = newObj;
  }
  obj._$visited = true;
  var result;
  if (obj instanceof Array) {
    result = obj.map(function (o) {
      return __toJSONSafe(o, replacer);
    });
  } else if (typeof (obj) === "function") {
    result = undefined;
  } else {
    result = {};
    for (var prop in obj) {
      if (prop === "_$visited") continue;
      var val = obj[prop];
      if (replacer) {
        val = replacer(prop, val);
        if (val === undefined) continue;
      }
      val = __toJSONSafe(val, replacer);
      if (val === undefined) continue;
      result[prop] = val;
    }
  }
  delete obj._$visited;
  return result;
}
225982
function parseCookies(str) {
  var cookies = {};

  var ary = (str || '').split(/;\s+/);
  _.map(ary, function(ck) {
    var parsed = ck.trim().split('=');
    cookies[parsed[0]] = parsed[1];
  });

  return cookies;
}
839415
function (obj) {
		if (typeof obj !== "object" || obj === null) {
			return obj;
		}
		
		if (obj instanceof Date) {
			return new Date(obj.getTime());
		}
		
		if (obj instanceof RegExp) {
			return new RegExp(obj);
		}
		
		if (obj instanceof Array && Object.keys(obj).every(function (k) {
				return !isNaN(k);
			})) {
			return obj.slice(0);
		}
		var _obj = {};
		for (var attr in obj) {
			if (Object.hasOwnProperty.call(obj, attr)) {
				_obj[attr] = swagger.cloneObj(obj[attr]);
			}
		}
		return _obj;
	}