HamiltonianTermsJsonConverter Class

Definition

This JsonConverter allows correctly serialized HamiltonianTerms. This terms are in general problematic because their keys are not strings, but HamiltonianTerms, which json.net doesn't like by default. This converts the Dictionaries to List of Tuples, in which the first item of the tuple is the key and the second the value.

public class HamiltonianTermsJsonConverter : Newtonsoft.Json.JsonConverter
type HamiltonianTermsJsonConverter = class
    inherit JsonConverter
Public Class HamiltonianTermsJsonConverter
Inherits JsonConverter
Inheritance
Newtonsoft.Json.JsonConverter
HamiltonianTermsJsonConverter

Constructors

HamiltonianTermsJsonConverter()

Methods

CanConvert(Type)

Returns true only if the Type is HamitonianTerm or HamiltonianTerms

ReadJson(JsonReader, Type, Object, JsonSerializer)

Reads the HamiltonianTerms from a list of (Key, Value) tuples.

WriteJson(JsonWriter, Object, JsonSerializer)

Writers the HamiltonianTerms as a list of (Key, Value) tuples.

Applies to