{"package": {
"name": "Test Package", /* Required or 'Untitled' (default value) */
"author": "Zeggy", /* Optional, maybe a default value */
"version": 1.1, /* Version, must be a number */
"actions": [
{
"name": "Adding test code", /* Name for this particular process, required */
"file": "edit_me.php", /* Required */
"action": "add", /* choose out of [add, remove, replace], is required */
"type": "before", /* before, after */
"where": "$test = \"123321\";", /* Code to search for */
"code": "blabla
blabla
more code" /*Code to add/remove/replace */
},
{
"name": "Removing a comment",
"file": "another_file.php", /* Required */
"action": "remove",
"code": "\/\/This is a PHP comment!\\n" /* Removing this comment, 'where' not required */
},
{
"name": "Replacing $var1",
"file": "replace.php", /* Required */
"action": "replace",
"where": "$var1 = \"var numba 1\";", /* Find this string */
"code": "$var2 = \"new var #2\";" /* Replace with this */
}
]
}}
its valid json...comments are allowed...except for the portion highlighted in red...strings in javascript have to be terminated in the same line...but both IE and FF allow the C style continutation using the \
so, u can either write
Code:
"code": "blabla blabla more code"
or
Code:
"code": "blabla\
blabla\
more code"
__________________
You never have to change anything you got up in the middle of the night to write. -- Saul Bellow