Closed kMutagene closed 1 year ago
this PR
adds match cases for Option (JsonArray, Object, Value, Node) to the parseAny function. the main reason is i want to be able to do this:
parseAny
let myOptionalObject = Some (object {property "key" "value"}) object { property "optional" (-. myOptionalObject ) }
changes optional -> optionalObject and optionaL -> optionalArray to make it more clear how to use them:
optional
optionalObject
optionaL
optionalArray
object { property "willFail" (object { optionalObject property "" (+. Option.None) }) // will return {} object { property "willFail" (array { yield optionalArray yield (+. Option.None) }) // will return {}
changes required -> requiredObject and requireD -> requiredArray to make it more clear how to use them:
required
requiredObject
requireD
requiredArray
object { property "willFail" (object { requiredObject property "" (+. Option.None) }) // will fail object { property "willFail" (array { yield optionalArray yield (+. Option.None) }) // will fail
adds some more FSharpExtensions for JsonNodes, including some refactoring of existing functions
adds tests
adds some readme documentation
this PR
adds match cases for Option (JsonArray, Object, Value, Node) to the
parseAny
function. the main reason is i want to be able to do this:changes
optional
->optionalObject
andoptionaL
->optionalArray
to make it more clear how to use them:changes
required
->requiredObject
andrequireD
->requiredArray
to make it more clear how to use them:adds some more FSharpExtensions for JsonNodes, including some refactoring of existing functions
adds tests
adds some readme documentation