Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-960

Implement simple macro system in JSONSerializer

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.4
    • 2.1
    • core-json
    • None
    • All

    Description

      It occurred to me since we are using JSON style sheets to style our application, and it is getting quite big, that a macro system (maybe similar to C/C++ with #define or something similar) would be useful, especially for repeated colors, and other constants (like padding values, fonts, etc.) This would enable using custom values consistently while avoiding inconsistencies due to typos or changes introduced one place and not others.
      I was thinking of a simple
      #define NAME value
      as in C/C++, and then using $(NAME) as the substitution token. This is easily implemented in JSONSerializer.
      I'm open to suggestions for the syntax, but I believe the feature will be very useful, especially for the JSON stylesheet.

      Attachments

        1. 960.patch
          10 kB
          Roger Lee Whitcomb

        Activity

          People

            rwhitcomb Roger Lee Whitcomb
            rwhitcomb Roger Lee Whitcomb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: