Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Serialize a string object dictionary containing a string array as object #54

Open
agenne opened this issue Oct 27, 2022 · 0 comments

Comments

@agenne
Copy link

agenne commented Oct 27, 2022

Hi, ist it possible to fix this problem:
the dictionary serialization failes when the object is a string[].
"Dynamic type is not a contract-type: String[]"

[SerializableType]
public class AttributesSample
{
private int fMyProperty1;
[NonSerializableMember]
public int MyProperty1 { get => fMyProperty1; set => fMyProperty1 = value; }

public int MyProperty2 { get; set; }

public string[] MyProperty3 { get; set; }

private Dictionary<string, object> fProcessObjectDictionary;
public Dictionary<string, object> ProcessObjectDictionary
{
  get
  {
    if (fProcessObjectDictionary == null)
    {
      fProcessObjectDictionary = new Dictionary<string, object>();
    }
    return fProcessObjectDictionary;
  }
  set { fProcessObjectDictionary = value; }
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant