Closed et1975 closed 4 years ago
Added unit tests that roundtrip these types using Thoth's IJsonSerializer
impl and they pass. Looking for ideas...
Oops, closed accidentally!
Do you know what Response.accepted
is calling for serializing the JSON?
Implement seems to be, but I don't know it's being handled by Saturn or Giraffe.
let accepted (ctx: HttpContext) res =
Successful.ACCEPTED res Common.halt ctx
Looking at the stack trace ACCEPTED
calls ctx.WriteJsonAsync
, but if I call ctx.WriteJsonAsync
directly it serializes successfuly!
Do you also use the SerializeToBytes
function in your tests?
@ChrSteinert Is the question for me?
Sorry, @MangelMaxime - the question was for @et1975
Do you also use the
SerializeToBytes
function in your tests?
@ChrSteinert no.
Hey, I can't reproduce that on current master, this test is passing just fine - https://github.com/SaturnFramework/Saturn/blob/master/tests/Saturn.UnitTests/SimpleTests.fs
Let's close this, I'm not working anymore on the project where this came up.
Getting
json
function andctx.WriteJsonAsync
has no problem serializingPresentation.Link list
type elsewhere. What am I doing wrong?here's how I'm calling it:
and the router: