system.mes.meter.importMeterTypesFromJson
Description
Imports Meter Type records from a JSON file.
Permissions
This method requires the METERING.WRITE.SAVE permission.
Syntax
system.mes.meter.importMeterTypesFromJson(bytes)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
bytes | byte[] | False | The JSON file contents as bytes. |
Returns
Returns a JSON representation of the import response.
Code Examples
Script Console
# Open a file dialog and import Meter Types from the selected JSON file
path = system.file.openFile("json")
if path is not None:
jsonBytes = system.file.readFileAsBytes(path)
response = system.mes.meter.importMeterTypesFromJson(jsonBytes)
print(response)