Jump to content

Recommended Posts

Posted

I am trying to run the clean utility but it's coming up with an error all the time.....

Quote

Error decoding configuration file conf.json : invalid character 'T' looking for beginning of value

Please can anyone shed any light on this?

Posted

The error suggests that there is a 'T' where it's expecting something else.

I would begin by checking that the JSON is valid with an online validator, and then ensuring that all text values are enclosed in quotes.

  • Like 2
Posted

So I have checked and added "s around the True but now there is another error

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.CleanAssets of type bool

The code is this, we are just clearing out one asset class:

{
    "CleanRequests": false,
    "RequestServices":[],
    "RequestCatalogItems":[],
    "RequestStatuses":[],
    "RequestTypes":[],
    "KeepRequestsCancelBPTasks": false,
    "RequestReferences":[],
    "RequestLogDateFrom":"",
    "RequestLogDateTo":"",
    "RequestClosedDateFrom":"",
    "RequestClosedDateTo":"",
    "CleanAssets": "True",
    "AssetClassID": "mobileDevice",
    "AssetTypeID": "22",
    "AssetFilters": [],
    "CleanUsers":false,
    "Users":[],
    "CleanServiceAvailabilityHistory": false,
    "ServiceAvailabilityServiceIDs": [],
    "CleanContacts": false,
    "ContactIDs": [],
    "CleanOrganisations": false,
    "OrganisationIDs": [],
    "CleanSuppliers": false,
    "SupplierIDs": [],
    "CleanSupplierContracts": false,
    "SupplierContractIDs": [],
    "CleanEmails": false,
    "EmailFilters": {
        "FolderIDs": [],
        "RecipientAddress": "",
        "RecipientClass": "",
        "ReceivedFrom": "",
        "ReceivedTo": "",
        "Subject": ""
    }
}

Posted
7 minutes ago, Jeremy said:

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.CleanAssets of type bool

In that case use true as the boolean without any quotes and all lower case. True or "True" are not boolean values

image.png

Posted

So I have changed to 

"CleanAssets": true,
    "AssetClassID": "mobileDevice",
    "AssetTypeID": "22",
    "AssetFilters": [],

 

But there is still an error

Error decoding configuration file conf.json : json: cannot unmarshal string into Go struct field cleanerConfStruct.AssetTypeID of type int

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...