Select to view content in your preferred language

Export Attribute Rules in JSON format instead of CSV

605
2
05-30-2024 02:46 PM
Status: Open
Brian_Wilson
Honored Contributor

Saving code in CSV format? Who does that?

Please make it possible to export/import attribute rules in JSON format, so that it is practical to commit it to a code repository and treat it like code.

This will make rules more portable to future versions of products too.

It would probably be a lot easier to share them too.

 

2 Comments
GrahamWood-HWC

Great Idea!

GrahamWoodHWC_0-1718766097835.png

Example of the problem. Multiple lines allowed in the value scriptexpression CSV row due to my rules having carriage returns and indentation. By using JSON this could be encapsulated and handled better.

justin-mpls

This is a really good idea.  As I write more Attribute Rules for my databases, I find myself wanting for a way to keep them under version control in git.  I briefly considered using the CSV export, but took one look at the resulting file and decided it would be more trouble than it's worth.  For now, I am keeping my rules in git as .js files so I get some syntax highlighting, but it would be very nice to have a format that we could export from and import to the database using a GP tool.  JSON seems like a good choice, certainly would be easier to work with than CSV.