Skip to content

Instantly share code, notes, and snippets.

View rahulkp220's full-sized avatar
🎯
Focusing

Rahul rahulkp220

🎯
Focusing
View GitHub Profile
from json import loads,dumps
def Unicodify(func):
“””
Checkes in the incoming data-types and returns unicode values
Intended only for strings and JSON Objects
“””
def wrapper(obj):
if isinstance(obj, str):
return loads(obj)
elif isinstance(obj, dict):
@rahulkp220
rahulkp220 / api.rs
Last active December 19, 2023 20:42
Connect JSON Placeholder API with Rust
use reqwest;
#[derive(serde::Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct Todo {
user_id: i32,
id: i32,
title: String,
completed: bool,
}