Comments (7)
BrowserCompatible在Map里的作用等同于 WriteNonStringKeyAsString
从这里com.alibaba.fastjson2.writer.ObjectWriterImplMap#write
可以看到,会直接toString
from fastjson2.
感谢解答,目前如果要对日期型 key,Fastjson 可以统一处理吗
from fastjson2.
感谢解答,目前如果要对日期型 key,Fastjson 可以统一处理吗
我是觉得直接 toString 有点草率了,因为序列化之后可能就是String,应该获取序列化之后的结果,根据结果判定需不需要转 string
from fastjson2.
我能想到的就是根据前后的 offset 偏移量取出序列化后的值,然后可能才去重写这部分序列化的结果
from fastjson2.
@wenshao 这个你在做了吗?我这边做了一版,试了下没问题,要不要我提个 PR 看下?
from fastjson2.
已经提了 PR,看下是否合适
from fastjson2.
https://github.com/alibaba/fastjson2/releases/tag/2.0.46
请用新版本
from fastjson2.
Related Issues (20)
- [BUG]反序列化报错 JSONException HOT 1
- [QUESTION] 从1.x升级后JSON.toJSON() 方法遇到的问题 HOT 1
- [BUG]JSONPath不支持中划线 HOT 7
- [BUG]枚举类型反序列化问题 HOT 1
- [BUG] 反序列化时JSONObject字段出现{"h":{***}}结构 HOT 6
- [BUG]Dubbo Tri协议调用序列化报错 HOT 7
- [BUG] wiki描述有误
- [BUG] 反序列化null的list报错 HOT 7
- [BUG] 版本2.0.46 引用类型、Boolean、Short 不支持JSONWriter.Feature.WriteNulls HOT 6
- [BUG]2.0.45 JSONObject 反系列化字段结果为null HOT 4
- 支持jsonschema数据的fake
- [QUESTION]使用parseObject反序列化一个类,类中包含一个枚举类,会出现null的情况,请问该怎么解决这个问题? HOT 7
- 1.x升级到2.x出现的问题 HOT 2
- [BUG]在某些Android设备上处理数据时崩溃 HOT 10
- [BUG] springboot3 kotlin isOk会序列化成ok,有办法解决吗 HOT 7
- [BUG] 时间日期yyyy-MM-ddTHH:mm:ss.SSSZ 带“Z”的字符串默认转换时区未正确转换 HOT 3
- fastjson2 (version 2.0.46), JSONType注解指定自定义序列化无效[BUG] HOT 5
- [BUG]消息转换器会将符号转义 HOT 5
- [BUG](2.0.43版本)@JSONField的属性serializeUsing中针对MultipartFile指定ObjectWriter不生效
- [QUESTION]文档更新 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastjson2.