Syntax Issue on custom formatter hjson file

Hello @Teodor,
With the example below, I want to add 2 formatters to the interface. However, I am getting syntax errors. I couldn’t find the syntax error, can you check it?

image

 {
      type: 'method_serialize',
      groupTitle : 'Custom Formatters',
      groupIcon : 'fa fa-lg fa-key',
      addTitle: 'Serialize JSON',
      title : 'Serialize JSON',
      icon : 'fa fa-lg fa-font',
      state : 'opened',
      help : 'you can convert json to serialized object'
    },
    {
      type: 'method_genNumber',
      groupTitle : 'Custom Formatters',
      groupIcon : 'fa fa-lg fa-key',
      addTitle: 'Generate Number',
      title : 'Generate Number',
      icon : 'fa fa-lg fa-hashtag',
      state : 'opened',
      help : 'Generates a random number between the start and end range..',
      properties : [
        {
          group: 'Properties',
          variables: [
            {
                name: '1', 
                optionName: '1', 
                title: 'Start', 
                type: 'number',
                serverDataBindings: true, 
                defaultValue: '',
                help: 'Generates a random number between the start and end range. '
            }
          ]
        }
      ]
    }

Your code is a bit incorrect. When you have multiple formatters you should wrap them in [ and ]
It was stated in the docs as note :slight_smile:

So just put a [ in the beginning and ] and the end of your code

:slight_smile: I was excited to try it as soon as possible and I missed it … solved :slight_smile:
Thanks @George

1 Like

Well I’m looking forward of what you can make :slight_smile: and feedback of the whole process of course

1 Like

Of course, I will upload a few ready-made simple components here. :+1:

3 Likes