instances.json#

instances.json configuration#

instances.json captures information about instances for RPS Files Processor. In "Instances", one must define "ClassName" and "PropertyName" as well as other options. Those include

  • ExtractValueRegex defining the authorized characters, e.g. (\w(?<!_)|\~)+ is used for word-by-word separation,
  • Type giving the type of the field, default is a "String", can be "Long" or "DateTime" for instance,
  • Format giving the main format of a field such as "dd/MM/yy" for a date,
  • AllowedFormats giving other acceptable formats such as "dd/MM/yyyy" for a date.

ClassNames and PropertyNames must match those of the corresponding configuration in RPS Core Configuration.

Example of instances.json#

{
  "Instances": [
    {
      "ClassName": "example1.PersonalDetails",
      "PropertyName": "Names",
      "ExtractRegex": "(\\w(?<!_)|\\~)+"
    },
    {
      "ClassName": "example1.PersonalDetails",
      "PropertyName": "DateOfBirthOrDeath",
      "Format": "ddMMyyyy",
      "AllowedFormats": [
        "dd/MM/yyyy",
        "dd/MM/yy"
      ]
    },
    {
      "ClassName": "example1.Addresses",
      "PropertyName": "PostCode"
    },
    {
      "ClassName": "example1.PhoneNumbers",
      "PropertyName": "PhoneNumber",
      "ExtractValueRegex": "[0-9]+"
    }
  ]
}