Skip to content
Ruby script which validates all json files in your Xcode project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


XcodeValidateJson is a Ruby script that validates all json files within your Xcode project

Installation & Usage

  • Copy the XcodeValidateJson.rb script to the root of your Xcode project
  • Create a New Run Script Phase and add the following
if [ -f "$file" ]
echo "$file found."
ruby XcodeValidateJson.rb
echo "XcodeValidateJson.rb doesn't exist"

By default the validator will treat all malformed json files as errors, causing your build to fail.

Pass in warn as an argument to treat these as warnings only.


This is my first real attempt at Ruby, so I welcome all feedback/pull requests for improvements or added features

Next steps are to add file & folder exclusions (as Unit Tests in your project may need to test against a malformed json file....)

Contact & Licencing

Feel free to share as you please, Kudos is always welcome and can be found online at:

You can’t perform that action at this time.