Questions tagged [manatee.json]

An MIT license library to manipulate json and validate json schemas in .net - https://github.com/gregsdennis/Manatee.Json.

Recently migrated from Newtonsoft to System.Text.Json. The old project has been archived and the new on can be found under https://json-everything.net/

8 questions
1
vote
1 answer

How to serialize Manatee.Json.JsonValue?

I use Manatee.Json.JsonValue a whole lot, for instance in a case I have now, where I have a property of type object. This object property can contain both literals or complex types. When the property value contains a complex type of JsonValue, it is…
pekaaw
  • 2,309
  • 19
  • 18
1
vote
1 answer

JsonConverter in Manatee Json

I am using Manatee Json for de-/serialization. I want to do use the similar functionality which is available in Netwonsoft where one can override JsonConverter Read and Write Json. Do we have an example on how to do that in Manatee?
Piyush Sardana
  • 1,748
  • 4
  • 19
  • 33
0
votes
2 answers

Manatee.Json get human readable SchemaValidationResults output

How can I print SchemaValidationResults in a human readable format (e.g. JSON)? Documentation page talks about different output formats (JsonSchemaOptions.OutputFormat property), but I cannot figure out how to get to text representation. My code has…
GKalnytskyi
  • 579
  • 7
  • 16
0
votes
1 answer

Manatee.json - how to serialize using camelcase naming

Some frameworks like JSON.NET, you can serialize an object to json CamelCase naming like this: User user1 = new User { UserName = "jamesn", Enabled = true }; DefaultContractResolver contractResolver = new DefaultContractResolver { …
E. Silveira
  • 53
  • 1
  • 6
0
votes
1 answer

Replacing System.Text.Json with Manatee.Json for serialization in .NET Core 3

Background I want to provide some JsonSchema from my .NET Core 3 application, as well as other objects serialized into JSON. Since Manatee.Json is frequently updated and provides good support for JsonSchema, they are my preferred choice. At the same…
pekaaw
  • 2,309
  • 19
  • 18
0
votes
1 answer

Serializing Manatee.Json in .NET Core 3

Background I want to provide some JsonSchema from my .NET Core 3 application, as well as other objects serialized into JSON. Since Manatee.Json is frequently updated and provides good support for JsonSchema, they are my preferred choice. At the same…
pekaaw
  • 2,309
  • 19
  • 18
-1
votes
1 answer

Is there an easy way to get a Manatee.JsonObject from a JSON string?

We have a string that is JSON {"value":1} that we need to convert to a Manatee.Json.JsonValue. Using new JsonValue(value) returns "{\"value\":1}" but we are looking for an actual JSON value of {"value":1}. We have toyed with JsonObject, and it is…
deadflowers
  • 63
  • 1
  • 13
-1
votes
1 answer

Validation fails but error messages missing

I'm attempting to validate a JSON file against a specific schema using this code: string data = File.ReadAllText("../../../testFiles/create.json"); string schemaText = File.ReadAllText("../../../schemas/request-payload.schema.json"); var serializer…
TimTheEnchanter
  • 3,370
  • 1
  • 26
  • 47