Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/20 16:25:39 (5 years ago)
Author:
dpiringe
Message:

#3026:

  • deleted: ConvertableAttribute, DummyConverter, ObjectExtensions
  • renamed: CustomJsonWriter -> SingleLineArrayJsonWriter, JCInstantiator -> JsonTemplateInstantiator
  • added: JsonItemConverterFactory, UnsupportedJsonItem
  • IJsonItemConverter:
    • added two new properties: Priority and ConvertableType -> because converters are automatically collected by plugin infrastructure now
    • Extract, Inject references a root converter now -> typically an instance of JsonItemConverter -> to prevent cycles
  • JsonItemConverter:
    • now implements the interface IJsonItemConverter
    • is now a dynamic class
    • is only instantiable with an factory (JsonItemConverterFactory)
    • still has the old (but now public) static methods Extract and Inject (without ref param IJsonItemConverter root) -> creates instance with factory and calls methods of instance
    • removed register and unregister methods, because the factory collects all converters automatically now (on first call of Create)
    • has cycle detection for Extract and Inject
    • renamed method Get to GetConverter
File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/SingleLineArrayJsonWriter.cs

    r17393 r17394  
    88  /// It collapses arrays into a single line.
    99  /// </summary>
    10   internal class CustomJsonWriter : JsonTextWriter {
     10  internal class SingleLineArrayJsonWriter : JsonTextWriter {
    1111    private bool isRangeArray = false;
    1212    public override void WriteStartArray() {
     
    3232    }
    3333
    34     public CustomJsonWriter(TextWriter writer) : base(writer) { }
     34    public SingleLineArrayJsonWriter(TextWriter writer) : base(writer) { }
    3535
    3636    public static string Serialize(JToken token) {
    3737      JsonSerializer serializer = new JsonSerializer();
    3838      StringWriter sw = new StringWriter();
    39       CustomJsonWriter writer = new CustomJsonWriter(sw);
     39      SingleLineArrayJsonWriter writer = new SingleLineArrayJsonWriter(sw);
    4040      writer.Formatting = Formatting.Indented;
    4141      serializer.Serialize(writer, token);
Note: See TracChangeset for help on using the changeset viewer.