How to use the quicktype-core/dist/support/Strings.stringEscape function in quicktype-core

To help you get started, we’ve selected a few quicktype-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github segmentio / typewriter / src / commands / gen-ios.ts View on Github external
this.forEachClassProperty(c, 'none', (name, jsonName) =>
          this.emitLine(`@"${stringEscape(jsonName)}": @"`, name, `",`)
        )
github segmentio / typewriter / src / commands / gen-ios.ts View on Github external
this.forEachClassProperty(c, 'none', (propertyName, jsonKey, property) => {
            if (!this.implicitlyConvertsToJSON(property.type)) {
              const key = stringEscape(jsonKey)
              const name = ['_', propertyName]
              this.emitLine('@"', key, '": ', this.toDynamicExpression(property.type, name), ',')
            }
          })
        })