Closed no1melman closed 1 month ago
The source code in vogen shows this where on write the options are passed through:
https://github.com/SteveDunn/Vogen/blob/5ccd497ebd38846e535367cf062ea0c0c34808fa/src/Vogen/Templates/AnyOtherType/AnyOtherType_SystemTextJsonConverter.cs#L1-L33
But the auto gen gives me this
internal class DataRecordIdSystemTextJsonConverter : global::System.Text.Json.Serialization.JsonConverter<DataRecordId> { public override DataRecordId Read(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { var primitive = global::System.Text.Json.JsonSerializer.Deserialize<SurrealId>(ref reader, options); return DataRecordId.__Deserialize(primitive); } public override void Write(System.Text.Json.Utf8JsonWriter writer, DataRecordId value, global::System.Text.Json.JsonSerializerOptions options) { global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value); } #if NET6_0_OR_GREATER public override DataRecordId ReadAsPropertyName(ref global::System.Text.Json.Utf8JsonReader reader, global::System.Type typeToConvert, global::System.Text.Json.JsonSerializerOptions options) { var primitive = global::System.Text.Json.JsonSerializer.Deserialize<SurrealId>(ref reader, options); return DataRecordId.__Deserialize(primitive); } public override void WriteAsPropertyName(System.Text.Json.Utf8JsonWriter writer, DataRecordId value, global::System.Text.Json.JsonSerializerOptions options) { writer.WritePropertyName(global::System.Text.Json.JsonSerializer.Serialize(value.Value)); } #endif }
Something seems to be askew
Old 4.0.8 version...
Thanks for the feedback @no1melman - I'm glad that it's working for you in the new version.
The source code in vogen shows this where on write the options are passed through:
https://github.com/SteveDunn/Vogen/blob/5ccd497ebd38846e535367cf062ea0c0c34808fa/src/Vogen/Templates/AnyOtherType/AnyOtherType_SystemTextJsonConverter.cs#L1-L33
But the auto gen gives me this
Something seems to be askew