Sha256: 81c59638f88f2d450f08b94bf74be8877b84be8b9902fa9be50cf2283a9a42b7
Contents?: true
Size: 469 Bytes
Versions: 1
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true require 'json' module AppleReceipt # NextStepParser parses NextSTEP Plist data structures. module NextStepParser module_function def parse(input) # Transform JSON-like NextSTEP PList data into JSON raw_json = input.gsub(/;\n\t/, ",\n\t") .gsub(/\ =/, ':') .gsub(/;\n/, '') h = JSON.parse(raw_json) h.transform_keys { |k| k.tr('-', '_') } end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
apple_receipt-0.2.2 | lib/apple_receipt/next_step_parser.rb |