Gather up a JSON response from a server, and call the cb
redux-api-call (npm.im/redux-api-call) adapter to parse JSON response and fallback to raw text"
This library helps you build and parse JSON response using JSON API format.
Parse JSON with more helpful errors
JSON.parse with context information on error
JSON.parse with context information on error
Parse partial JSON generated by LLM
JSON parse with prototype poisoning protection
Parse and stringify JSON with comments. It will retain comments even after saved!
Creates an async iterator for a variety of inputs in the browser and node. Supports fetch, node-fetch, and cross-fetch
Parse HTTP Content-Type header according to RFC 7231
Parse, Resolve, and Dereference JSON Schema $ref pointers
Big-friendly JSON. Asynchronous streaming functions for large JSON data sets.
Like request, but smaller.
Parse json safely and at max speed
Parse a JSON string that has git merge conflicts, resolving if possible
hast utility to create an element from a simple CSS selector
Parse JSON without risk of losing numeric information
A super light and fast circular JSON parser.
Read and parse a JSON file
Encode/decode circular structures for converting to and from JSON.
Parse JSON safely without throwing
A set of efficient utilities that extend the use of JSON (streaming, estimate size, NDJSON/JSONL, etc.)
Parser adapter for parsing JSON documents into base namespace.
Format JSON API responses and parse inbound requests.
Editrix is a gem for parsing Healthcare Eligibility Response (271) ASC X12 EDI data into painless formats like hash or a json.
Executes queries to Prolenea's LNP API and parses the results and returns a cleaner JSON response.
Ruby utility library for network requests. Based on Faraday and Excon, provides a wrapper for XML/JSON parsing and error handling. All successful responses are returned as hash with key data, all errors in a JSONAPI-friendly hash with key errors.
A ruby client for the gitter (https://gitter.im) API. Includes an `ActiveRecord`-like interface with models that are parsed from the responses, as well as a lower level request/json-response interface.
Micky makes simple HTTP requests (GET/HEAD), follows redirects, handles exceptions (invalid hosts/URIs, server errors, timeouts, redirect loops), automatically parses responses (JSON, etc.), is very lightweight, and has no dependency.
Most JSON APIs have a limited number of respondes or outcomes. Microcon tries to separate HTTP related concerns from business logic and removes most of the mental clutter regarding JSON parsing, rendering and consistent API responses.
`api_rspecta` adds following helper methods to test your JSON APIs with RSpec: **JSON:** - `#json` returns parsed `last_response.body` - `#refresh_json` reparses `last_response.body` - `#print_json` to `JSON.pretty_generate` last response JSON - `#json_has_key` tells you if passed json object has a `key` - `#json_has_keys` same as above but for a list of keys - `#json_has_no_key` is opposite to `#json_has_key` **Response:** - `should_respond_ok` checks if `last_response.status` was 200 - `should_respond_created` checks if `last_response.status` was 201 - `should_respond_with_no_content` checks if `last_response.status` was 204 - `should_respond_not_authenticated` checks if `last_response.status` was 401 - `should_respond_not_authorized` checks if `last_response.status` was 403 - `should_respond_not_found` checks if `last_response.status` was 404 - `should_respond_with_error_for` checks if `last_response.status` was 422 and that `json` has `errors` for passed `field` - `should_respond_with_errors_for` same as above but for a list of errors
ObjectableJSON is simple and clever JSON => Object Mapper. ObjectableJSON automatically analyze your JSON values and convert the values to Single Object. So, you can easily convert JSON to Single Object by only calling ObjectableJSON#parse method. Especially, this gem is powerful & useful when you treat some API JSON response. Also, this gem can work for Hash.
A basic adaptor to send HTTP requests and parse the responses. Intended to bootstrap the quick writing of Adaptors for specific APIs, without having to write the same old JSON request and processing time and time again.
SmarterJSON is a permissive JSON/JSON5 parser: comments, trailing commas, different quote styles, Python/JS keywords, and more, all parse to the same Ruby objects. Purposely no strict mode, always best-effort, blazing fast. Handles BOM, smart quotes, messy input. Compatible with config/data files and API responses alike.
# FaradayError [](https://badge.fury.io/rb/faraday_error) A [Faraday](https://github.com/lostisland/faraday) middleware for adding request parameters to your exception tracker. ### Supports - [Honeybadger](https://www.honeybadger.io/) - [NewRelic](http://newrelic.com/) - Your favorite thing, as soon as you make a pull request! ## Installation Add this line to your application's Gemfile: ```ruby gem 'faraday_error' ``` And then execute: $ bundle Or install it yourself as: $ gem install faraday_error ## Usage Configure your Faraday connection to use this middleware. You can optionally specify a name; defaults to `faraday`. It is expected that you also use `Faraday::Response::RaiseError` somewhere in your stack. ```ruby connection = Faraday.new(url: 'http://localhost:4567') do |faraday| faraday.use FaradayError::Middleware, name: "example_request" faraday.use Faraday::Response::RaiseError faraday.adapter Faraday.default_adapter end ``` And that's it. Make a request as you normally would. ```ruby connection.post do |req| req.url '/503' req.headers['Content-Type'] = 'application/json' req.body = JSON.generate(abc: "xyz") end ``` If any request fails, Honeybadger's "context" for this error will include your request parameters. If sending JSON or `application/x-www-form-urlencoded`, these will be included in parsed form. ```json { "example_request": { "method": "post", "url": "http://localhost:4567/503", "request_headers": { "User-Agent": "Faraday v0.9.2", "Content-Type": "application/json" }, "body_length": 13, "body": { "abc": "xyz" } } } ``` ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). The included [RestReflector](../master/spec/rest_reflector.rb) Sinatra app is suitable for making requests that are guaranteed to fail in particlar ways. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/jelder/faraday_error. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
No description provided.
No description provided.
No description provided.
No description provided.