perl malformed JSON string, neither tag, array, object, number, string or atom, at character offset
2016-07-11 07:51
453 查看
[root@wx03 ~]# cat a17.pl use JSON qw/encode_json decode_json/ ; use Encode; my $data = [ { 'name' => 'Ken' , 'age' => 19 }, { 'name' => '测试' , 'age' => 25 } ]; ##解json格式 my $array = decode_json ( $data ); print "1111111111\n"; print $array->[0]->{name};; print "\n"; print $array->[1]->{name};; print "\n"; [root@wx03 ~]# perl a17.pl malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at a17.pl line 15.
相关文章推荐
- JAVA源码分析之---Object类(二)---hashCode,equals,clone方法的使用
- Objective-C -------简单版的摇一摇
- List<Map<String,Object>>的取值与赋值
- R-FCN: Object Detection via Region-based Fully Convolutional Networks
- 《OpenGL ES 2.0 Programming Guide》第12章“Framebuffer Objects”示例代码【C语言版】
- iOS学习(二十八)Objective-C 代理设计模式
- Objective-C :Category
- Java中Object对象的hashCode方法和String对象的hashCode
- iOS学习(二十七)Objective-C 协议
- iOS学习(二十六)Objective-C 分类
- Objective-C 构造方法
- Objective C转Swift注意事项(一)合理使用结构体,枚举,extensions
- iOS学习(二十五)Objective-C 动态创建
- iOS学习(二十四)Objective-C 动态绑定
- iOS学习(二十三)Objective-C 静态vs动态
- 泛型/dynamic/object作用
- Three.js源码之Object3D
- #码神心得_09# 包装类、Object类方法、final、抽象类
- Object方法详解
- R-CNN: Rich feature hierarchies for accurate object detection and semantic segmentation