we can reuse the existing PListEncoder and refactor like the following:
 
https://gist.github.com/cvasilak/47dcebb5b11489912083