Example #1
0
		/// <exception cref="JsonLD.Core.JsonLdError"></exception>
        private void Initialize(JToken input, JToken context, JsonLdOptions opts)
		{
			// set option defaults (TODO: clone?)
			// NOTE: sane defaults should be set in JsonLdOptions constructor
			this.opts = opts;
			if (input is JArray || input is JObject)
			{
				this.value = JsonLdUtils.Clone(input);
			}
			// TODO: string/IO input
			this.context = new Context(opts);
			if (!context.IsNull())
			{
				this.context = this.context.Parse(context);
			}
		}