What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-10-13 04:00:06
slack powershell command
$uriSlack = "https://hooks.slack.com/services/{guids}" $body = ConvertTo-Json @{ pretext = "Hello world" text = "This is the text below with a blue thingy next to it" color = "#142954" } try { Invok... Add solution -
Other 2021-10-12 16:46:03
check if string is valid json dart
void main() { var jsonString = '{"abc'; var decodeSucceeded = false; try { var decodedJSON = json.decode(jsonString) as Map<String, dynamic>; decodeSucceeded = true; } on FormatException catch (e) { print('The provided strin... Add solution -
Javascript 2021-10-12 11:27:07
read json file in typescript
// data.json: { "greeting" : "xin chao Vietnam" } // component: import * as data from 'data.json'; let greeting = data.greeting; //registering jsonModule in tsconfig.json "compilerOptions": { .... "resolveJsonMod... Add solution -
Python 2021-10-11 17:30:04
google sheet python write
from oauth2client.service_account import ServiceAccountCredentials import gspread scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.co... Add solution -
Javascript 2021-10-08 12:48:06
generate schema from json python
#Example usage of generating python code from jsonschemacodegen import python as pygen import json with open('schema.json') as fp: generator = pygen.GeneratorFromSchema('output_dir') generator.Generate(json.load(fp), 'Example', 'example') #using... Add solution -
Javascript 2021-10-06 14:19:05
fetch post json
//Obj of data to send in future like a dummyDb const data = { username: 'example' }; //POST request with body equal on data in JSON format fetch('https://example.com/profile', { method: 'POST', headers: { 'Content-Type': 'application/json', }, ... Add solution
Best helpers
Ranking is empty