| There are some issues with moving the state file from yaml to json format, the biggest one, being the value types. Json does not preserve the types, so if we write a symbol, it will read a string. This is one of the benefits when using yaml. The state file, as well as the transaction file contains strings and symbols for keys, as well for values. With json we can't have this, so it would mean changing a lot of code inside puppet to make it work. Another option that will read the correct type is marshal, but this has some security concerns, since it can load any arbitrary objects from from file. At this moment, the only viable option if we want to use json, is to write our own json serialiser (eg. like Microsoft did for the azure sdk - https://github.com/Azure/azure-sdk-for-ruby/blob/master/runtime/ms_rest/lib/ms_rest/serialization.rb ) and save the types, so we can read them back later. |