-
Notifications
You must be signed in to change notification settings - Fork 407
document model API improvements #2123
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
document model API improvements #2123
Conversation
ed7150e
to
408acca
Compare
@@ -23,10 +21,8 @@ static Serializer() | |||
NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.AllowNamedFloatingPointLiterals, | |||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping | |||
}; | |||
JsonSerializerOptions.Converters.Add(new ByteArrayConverter()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to keep this. When a notebook is saved it's sent back as a byte array, but serialized as a base64 string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is in Microsoft.DotNet.Interactive
, not Microsoft.DotNet.Interactive.Documents
. I removed the reference from the former to the latter. I assume the only case where we need this is here?
interactive/src/Microsoft.DotNet.Interactive.Documents/ParserServer/ParserServerSerializer.cs
Line 22 in 775a4bf
JsonSerializerOptions.Converters.Add(new ByteArrayConverter()); |
9444a83
to
8159c62
Compare
e20460a
to
263d4f0
Compare
This PR updates the Microsoft.DotNet.Interactive.Documents API to more closely follow the
.ipynb
spec and observed behavior in Jupyter Lab. It also makes more concepts explicit in the API and makes it mutable so that creating documents incrementally is easier.This addresses #2148.