Skip to main content

JSON

Some functions accessed through ArupCompute require JSON inputs. arupcomputepy will convert python lists / dictionaries to JSON for the user.

For example, if the input to a DesignCheck function is List<CustomData>, where CustomData is defined as:

public class CustomData
{
public double A { get; set; }
public double B { get; set; }

public CustomData()
{ }

public CustomData(double a, double b)
{
this.A = a;
this.B = b;
}
}

The corresponding required python will look like:

customData = [{ 'A' : 1, 'B' : 2}, { 'A' : 4, 'B' : 9}, { 'A' : 6, 'B' : 7}]