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

Error Serializing Array of Objects #325

Closed
dargmuesli opened this issue Jun 5, 2018 · 1 comment
Closed

Error Serializing Array of Objects #325

dargmuesli opened this issue Jun 5, 2018 · 1 comment

Comments

@dargmuesli
Copy link

I want this YAML to be generated:

ports:
- target: 80
  published: 80
  protocol: tcp
  mode: host
- target: 443
  published: 443
  protocol: tcp
  mode: host

Which is equal to this JSON:

"ports": [
  {
    "target": 80,
    "published": 80,
    "protocol": "tcp",
    "mode": "host"
  }, {
    "target": 443,
    "published": 443,
    "protocol": "tcp",
    "mode": "host"
  }
]

Instead, trying to serialize the JSON, I receive an Exception calling "Serialize" with "1" argument(s): "Too much recursion when traversing the object graph" using YamlDotNet 4.3.1. Am I doing something wrong or is this currently not supported by YamlDotNet?

@dargmuesli
Copy link
Author

Nvm, obviously this is supported. Looks like an error (reading the JSON) on my end.

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