jq as a service. Inspired by a tweet.

Overview

jqaas

jq as a service. Inspired by a tweet.

usage

For when you have to do some JSON mangling and you want a web server to do it for you. Supports both request input (using raw request body), and a URL fetch(via a url request param).

raw request

curl -d '{"hello": [1,2,3]}'  -H "JQ-Filter: .hello" http://jqaas.captnemo.in/ -i
HTTP/1.1 200 OK
Content-Type: application/json

[1,2,3]

using a remote resource

curl "https://jqaas.captnemo.in/?url=https://jsonblob.com/api/042e7473-807d-11e7-9e0d-a95b02c92cd2" -H "JQ-Filter: .hello" -i

HTTP/2 200
content-type: application/json

[1,2,3]

multiple-items

Just like jq, this also supports multi-line inputs:

curl --request POST \
  --url http://localhost:9998/ \
  --header 'jq-filter: .hello' \
  --data '{ "hello": [1,2,3]}
{"hello": [4,5,6]}'

HTTP/1.1 200 OK
Content-Type: application/x-ndjson

[1,2,3]
[4,5,6]

The Content-Type will be set to application/x-ndjson in such cases.

Infra

Currently being served on the Heroku Free Tier over Cloudflare for SSL.

License

Licensed under the MIT License.

You might also like...
Laravel style FormRequests for Symfony; inspired by adamsafr/form-request-bundle

Somnambulist Form Request Bundle An implementation of form requests from Laravel for Symfony based on the original work by Adam Sapraliev. Requirement

High performance view templating API for PHP applications using tags & expressions inspired by Java JSTL and C compiler

View Language API Table of contents: About Expressions Tags Configuration Compilation Installation Unit Tests Examples Reference Guide About This API

Psl is a standard library for PHP, inspired by hhvm/hsl
Psl is a standard library for PHP, inspired by hhvm/hsl

📚 PHP Standard Library - a modern, consistent, centralized, well-typed, non-blocking set of APIs for PHP programmers

A beautiful, fully open-source, tunneling service - written in pure PHP
A beautiful, fully open-source, tunneling service - written in pure PHP

Expose A completely open-source ngrok alternative - written in pure PHP. Documentation For installation instructions, in-depth usage and deployment de

λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.
λ Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda.

λ Swoole Runtime for AWS Lambda Run PHP Coroutines & Fibers as-a-Service on the AWS Lambda. Getting started Create your Lambda function index.php ?ph

Entree ARP service

This is my package entree-arp-service Installation You can install the package via composer: composer require learnkit/entree-arp-service You can publ

Fresns core library: Cross-platform general-purpose multiple content forms social network service software
Fresns core library: Cross-platform general-purpose multiple content forms social network service software

About Fresns Fresns is a free and open source social network service software, a general-purpose community product designed for cross-platform, and su

Composer as a service
Composer as a service

Composer as a service What is it? Originally the idea came from @pgodel Having some issue with little instances or slow connection, I decided to make

Phalcon PHP Meta tags Service

About Phalcon meta tags plugin for PhalconPHP. This plugin allows you to easily and flexibly customize the meta tags of your view. If this plugin help

Comments
  • CORS error on browser request

    CORS error on browser request

    I'm trying to make request to jqass from browser, but this error is generated anytime: Access to XMLHttpRequest at 'https://jqaas.captnemo.in/?url=https://thisdavej.api.stdlib.com/weather/current/?loc=Ivano-Frankivsk%26deg=C' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

    Please update response headers to allow CORS https://enable-cors.org/server_php.html

    opened by Chieftl 2
Owner
Nemo
Working at @razorpay
Nemo
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

TARS - A Linux Foundation Project TARS Foundation Official Website TARS Project Official Website WeChat Group: TARS01 WeChat Offical Account: TarsClou

THE TARS FOUNDATION PROJECTS 9.6k Jan 1, 2023
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 16 Jun 7, 2022
A data transfer object inspired by Rust's serde

Data Transfer Object Want to deserialize an object with data on the fly? Go for it by using the From trait. How is this package any different from spa

Randy Schütt 37 Dec 15, 2022
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Minibase 16 Jun 7, 2022
Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.DeepEqual().

Deeper Deeper is a easy way to compare if 2 objects is equal based on values in these objects. This library is heavily inspired in Golang's reflect.De

Joubert RedRat 4 Feb 12, 2022
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Stef Dawson 8 Oct 3, 2020
Developer-friendly framework heavily inspired by Laravel and based on Timber and Wpemerge solutions for WordPress themes development with Bedrock folder structure

Lightweight Brocooly (Brocket) Improved Controllers, Middleware and Routers, but slightly less powerful Container Open beta. Package in development Cr

Ihar Aliakseyenka 3 Mar 4, 2022
this starter kite inspired by laravel & Geo and mvc pattern. it's wrap for Wordpress built in classes.

WordpressStarterKite Introduction Built With Prerequisite Directory Structure Guidelines Getting Started Authors Introduction this starter kite inspir

Omar Hossam Eldin Kandil 7 Aug 24, 2022
A news website inspired from IEEE and MIT CSAIL's homepage

News-Website I made this website as a side project in April 2022. The goal was to learn PHP and implement backend features to a scientific news websit

Ethan Clement 3 Nov 15, 2022
A simple ByteBuffer implementation for PHP (Node.js inspired)

Bytebuffer A simple ByteBuffer implementation for PHP (Node.js inspired) Installation composer require labalityowo/bytebuffer:dev-stable Why? I made t

labalityowo 3 May 24, 2022