1
comment
comment
on 4/16/2018 11:29 PM
This is a minor release for WebSharper and WebSharper.UI.
Install templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.2.9.232
Download templates for Visual Studio 2017: http://websharper.com/installers/WebSharper.4.2.9.232.vsix
WebSharper Core
Enhancement
- #921 Now JSON deserialization can handle the
System.Object
type, implemented as follows:- deserializing on the client side just returns the parsed value (ie. one of:
null
, a boolean, a string, a number, an array or a plain object). - deserializing on the server side produces a boxed value:
- null, boolean, string return a value of the corresponding type.
- number: returns a
float
(System.Double
) - array: returns a recursively parsed
obj[]
- object: returns a recursively parsed
Dictionary<string, obj>
- serializing from
System.Object
is not supported. This is to avoid accidentally upcasting the argument ofJson.Serialize
toSystem.Object
when a type annotation is missing.
- deserializing on the client side just returns the parsed value (ie. one of:
Fixes
- #935
Seq.chunkBySize
and other similar functions does not fail erroneously on some inputs. - #934 If for a website project, there is no
"outputdir"
inws.config
orWebSharperOutputDir
in project properties or aweb.config
file in the project folder, an explicit error is given that the unpack output directory cannot be determined.
WebSharper UI
Enhancement
- Add
Router.InstallInto
andRouter.InstallHashInto
, which are similar toRouter.Install
andRouter.InstallHash
respectively except that they take aVar<'EndPoint>
as argument rather than creating and returning one.
Fixes
- #164 Remove
click
event handler onDoc.Checkbox
, only keepingchange
, to avoid setting the Var twice. - #166 Add proxy for quotation-based
.OnXyz(...)
event handlers. - #167 Fix initial value of
Var.Make
whenever an initial value is available from theView
. - #168 Add
View.TryGet : View<'T> -> option<'T>
which returns the current value of aView
if available, orNone
if not (eg if aView.MapAsync
hasn't returned yet).
Happy coding!