Git Product home page Git Product logo

Comments (7)

rowstop avatar rowstop commented on June 12, 2024

BrowserCompatible在Map里的作用等同于 WriteNonStringKeyAsString
从这里com.alibaba.fastjson2.writer.ObjectWriterImplMap#write可以看到,会直接toString

from fastjson2.

SkiffBoy avatar SkiffBoy commented on June 12, 2024

感谢解答,目前如果要对日期型 key,Fastjson 可以统一处理吗

from fastjson2.

rowstop avatar rowstop commented on June 12, 2024

感谢解答,目前如果要对日期型 key,Fastjson 可以统一处理吗

我是觉得直接 toString 有点草率了,因为序列化之后可能就是String,应该获取序列化之后的结果,根据结果判定需不需要转 string

from fastjson2.

rowstop avatar rowstop commented on June 12, 2024

我能想到的就是根据前后的 offset 偏移量取出序列化后的值,然后可能才去重写这部分序列化的结果

from fastjson2.

rowstop avatar rowstop commented on June 12, 2024

@wenshao 这个你在做了吗?我这边做了一版,试了下没问题,要不要我提个 PR 看下?

from fastjson2.

rowstop avatar rowstop commented on June 12, 2024

已经提了 PR,看下是否合适

from fastjson2.

wenshao avatar wenshao commented on June 12, 2024

https://github.com/alibaba/fastjson2/releases/tag/2.0.46
请用新版本

from fastjson2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.