【发布时间】:2017-06-29 16:12:06
【问题描述】:
- 我正在尝试将 JSON 文件导入
Sample变量,但Sample变量只显示前几个字符。 - sample.json 为 20,00,000 个字符,当我在 Console 上打印
Sample变量时,仅打印前 3,756 个字符。通过 console.log 可以打印的字符是否有任何限制? -
完整的数据保留在
Sample variable中,我通过搜索出现在sample.json文件末尾的字符串来验证它var Sample = require('./sample.json'); export default class proj extends Component { constructor(props) { super(props); this.state = { locations: [], }; } loadOnEvent() { console.log(Sample); //this.state={ locations : Sample }; } }
有没有其他方法可以打印Sample变量中的数据。
【问题讨论】:
标签: json react-native