json .read file code example
Example 1: read file json
with open('file.txt', 'r') as f:
data = f.read()
Example 2: read json file
const fs = require('fs')fs.readFile('./customer.json', 'utf8', (err, jsonString) => { if (err) { console.log("File read failed:", err) return } console.log('File data:', jsonString) })