internal static void SerializerHighlighterOptions(HighlighterOptions options, Dictionary<string, object> fieldDict)
        {
            if(fieldDict == null)
                fieldDict = new Dictionary<string,object>();

            fieldDict.AddObject(_BOUNDARY_CHARACTERS, options.BoundaryCharacters, _BOUNDARY_CHARACTERS_DEFAULT);
            fieldDict.AddObject(_BOUNDARY_MAXIMUM_SCAN, options.BoundaryMaximumScan, _BOUNDARY_MAXIMUM_SCAN_DEFAULT);
            fieldDict.AddObject(_ENCODER, options.Encoder.ToString(), _ENCODER_DEFAULT.ToString());
            fieldDict.AddObject(_FRAGMENT_SIZE, options.FragmentSize, _FRAGMENT_SIZE_DEFAULT);
            fieldDict.AddObject(_HIGHLIGHTER_TYPE, options.Type.ToString(), _HIGHLIGHTER_TYPE_DEFAULT.ToString());
            fieldDict.AddObject(_NO_MATCH_SIZE, options.NoMatchSize, _NO_MATCH_SIZE_DEFAULT);
            fieldDict.AddObject(_NUMBER_OF_FRAGMENTS, options.NumberOfFragments, _NUMBER_OF_FRAGMENTS_DEFAULT);
            fieldDict.AddObject(_PHRASE_LIMIT, options.PhraseLimit, _PHRASE_LIMIT_DEFAULT);
            fieldDict.AddObject(_POST_TAGS, options.PostTags);
            fieldDict.AddObject(_PRE_TAGS, options.PreTags);
            fieldDict.AddObject(_REQUIRE_FIELD_MATCH, options.RequireFieldMatch, _REQUIRE_FIELD_MATCH_DEFAULT);
            fieldDict.AddObject(_TAGS_SCHEMA, options.TagsSchema.ToString(), _TAGS_SCHEMA_DEFAULT.ToString());
        }
        internal static void DeserializeHighlighterOptions(HighlighterOptions options, Dictionary<string, object> fieldDict)
        {
            if(fieldDict == null || !fieldDict.Any())
                return;

            options.BoundaryCharacters = fieldDict.GetString(_BOUNDARY_CHARACTERS, _BOUNDARY_CHARACTERS_DEFAULT);
            options.BoundaryMaximumScan = fieldDict.GetInt32(_BOUNDARY_MAXIMUM_SCAN, _BOUNDARY_MAXIMUM_SCAN_DEFAULT);
            options.Encoder = EncoderTypeEnum.Find(fieldDict.GetString(_ENCODER, _ENCODER_DEFAULT.ToString()));
            options.FragmentSize = fieldDict.GetInt32(_FRAGMENT_SIZE, _FRAGMENT_SIZE_DEFAULT);
            options.NoMatchSize = fieldDict.GetInt32(_NO_MATCH_SIZE, _NO_MATCH_SIZE_DEFAULT);
            options.NumberOfFragments = fieldDict.GetInt32(_NUMBER_OF_FRAGMENTS, _NUMBER_OF_FRAGMENTS_DEFAULT);
            options.PhraseLimit = fieldDict.GetInt32(_PHRASE_LIMIT, _PHRASE_LIMIT_DEFAULT);
            if(fieldDict.ContainsKey(_POST_TAGS))
                options.PostTags = JsonConvert.DeserializeObject<IEnumerable<string>>(fieldDict.GetString(_POST_TAGS));
            if(fieldDict.ContainsKey(_PRE_TAGS))
                options.PreTags = JsonConvert.DeserializeObject<IEnumerable<string>>(fieldDict.GetString(_PRE_TAGS));
            options.RequireFieldMatch = fieldDict.GetBool(_REQUIRE_FIELD_MATCH, _REQUIRE_FIELD_MATCH_DEFAULT);
            options.TagsSchema = TagsSchemaEnum.Find(fieldDict.GetString(_TAGS_SCHEMA, _TAGS_SCHEMA_DEFAULT.ToString()));
            options.Type = HighlighterTypeEnum.Find(fieldDict.GetString(_HIGHLIGHTER_TYPE, _HIGHLIGHTER_TYPE_DEFAULT.ToString()));
        }