This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh -- | |
| # \ | |
| exec jq -nsRrf --args -- "$0" "$@" | |
| def path2gronpath: | |
| reduce .[] as $k ("json"; . + ($k | | |
| if type == "number" or . == "" or test("^[0-9]|[^0-9a-zA-Z_]") | |
| then @json "[\(.)]" | |
| else ".\(.)" | |
| end)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module { | |
| "name": "schema", | |
| "description": "JSON Schema Inference", | |
| "version": "0.0.3.1", | |
| "homepage": "https://gist.github.com/pkoppstein/a5abb4ebef3b0f72a6ed", | |
| "license": "MIT", | |
| "author": "pkoppstein at gmail dot com" | |
| }; | |
| # NEWS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSError *error = nil; | |
| void (^block)(NSError **error); | |
| block = ^(NSError **blockError) | |
| { | |
| NSArray *array = [NSArray arrayWithObject:@"hello"]; | |
| [array enumerateObjectsUsingBlock:^(id object, NSUInteger index, BOOL *stop) { | |
| if ( blockError != NULL ) | |
| { |