Home Download Buy Blog Forum Support

PlistJsonConverter

Re: PlistJsonConverter

Postby robertcollier4 on Tue Mar 26, 2013 2:34 pm

This is a great plugin, thank you. Please also vote for following Userecho Feature Request so hopefully this plugin might not be needed in the future and we can just stay in JSON land natively.
Userecho Feature Request: Allow color schemes to be read as JSON natively.
robertcollier4
 
Posts: 154
Joined: Sun Feb 24, 2013 5:37 pm

Re: PlistJsonConverter

Postby facelessuser on Tue Mar 26, 2013 5:12 pm

PlistJsonConverter allows for comments in the JSON file. So you can comment the JSON as much as you want, and then just generate the tmLanguage file when done. That way you can look at your JSON file as the commented source code, and the tmLanguage as your compiled code if you will.

I may even add a feature that will save plist json files with its own extentsion "plist-json", and then implement a "on_save" feature where if you save the plist-json file it will automatically be converted and written to the tmLanguage file giving you a feeling of more direct modification.

Thanks for your interest.
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: PlistJsonConverter

Postby facelessuser on Tue Mar 26, 2013 6:57 pm

Okay, I added the feature over lunch:

If you specify the extension in the following setting, when you save the JSON file, it will generate the plist in the same file automatically.

    "json_to_plist_on_save": [
"tmLanguage.JSON",
"tmPreferences.JSON",
"tmTheme.JSON"
]


Now you can just edit your JSON files and save them and know they will get converted automatically and reloaded into sublime. You can write all your comments in the JSON file and they should persist just fine.

Don't forget to add other plist conversion rules to your settings file if I am missing some other sublime plist files

    // When saving converted data to a file, or when opening
// conversion in new buffer use these extension maps for file name.
// Extensions will be evaluated in the order listed below.
// If the file does not match any of the extensions, the current
// extension will be replaced with either "plist" or "json" accordingly.
"conversion_ext": [
{"plist": "tmLanguage", "json": "tmLanguage.JSON"},
{"plist": "tmPreferences", "json": "tmPreferences.JSON"},
{"plist": "tmTheme", "json": "tmTheme.JSON"}
],

"json_to_plist_on_save": [
"tmLanguage.JSON",
"tmPreferences.JSON",
"tmTheme.JSON"
]
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Re: PlistJsonConverter

Postby facelessuser on Tue Jan 21, 2014 5:33 pm

This plugin has formally been replaced by SerializedDataConverter in PackageControl. PackageControl "should" update you automatically. You will probably have to update your settings file as some settings have changed.

Sublime forum thread for SerializedDataConverter: viewtopic.php?f=5&t=14614&start=0
Package Control Link: https://sublime.wbond.net/packages/Seri ... aConverter
facelessuser
 
Posts: 1576
Joined: Tue Apr 05, 2011 7:38 pm

Previous

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 10 guests