Skip to content

Tag: JSON

PowerShell 2

Validating JSON objects with PowerShell Advanced Function Parameters

PowerShell makes it really easy to convert JSON into (PSCustom) objects with the means of ConvertFrom-Json. But manually verifying every property after conversion is particular tedious and annoying work. Recently I wrote about Using typeful JSON Deserialisation and Validation in PowerShell. However, sometimes this is just not feasible as you might not have a C# class describing your data. Scripting […]

LightSwitch 3

[NoBrainer] Saving bandwidth with JSON when consuming ODATA services from PowerShell

When working with ODATA sources from PowerShell via a service reference (instead of using explicit REST call via Invoke-RestMethod) the .NET DataServiceClient will use Atom/XML under the hood. This works perfectly well except it consumes much more bandwidth because of the XML data format. As the whole ODATA interface is encapsulated via your service reference it really does not make […]