Changes set function to save value as JSON object in all cases, also changes get function to reflect the new API. For more details see PR #2