Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Code generator ideas? Maybe a JSON entity framework?

Code generator ideas? Maybe a JSON entity framework?

Scheduled Pinned Locked Moved The Lounge
designcomgraphicsiotjson
20 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H honey the codewitch

    Gosh, and yet I'm not the one complaining for no reason when I could just keep scrolling. Or creating an account just to say that. Get a job.

    Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

    M Offline
    M Offline
    Member 16144377
    wrote on last edited by
    #9

    Let's be honest here, all you ever do in the forums is whinge

    H 1 Reply Last reply
    0
    • M Member 16144377

      Let's be honest here, all you ever do in the forums is whinge

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #10

      Says the guy that created an account specifically to whine. Pardon me for saying so, but you don't seem very bright. Maybe you're just having an off day. Unemployment will do that.

      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

      J 1 Reply Last reply
      0
      • J jeron1

        Yet you still read it...because it may be over your head does not make it rubbish.

        "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #11

        He finally bumped out. I don't think he expected me to stuff him in a locker. :)

        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

        J 1 Reply Last reply
        0
        • H honey the codewitch

          He finally bumped out. I don't think he expected me to stuff him in a locker. :)

          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

          J Offline
          J Offline
          jeron1
          wrote on last edited by
          #12

          honey the codewitch wrote:

          He finally bumped out.

          :thumbsup: Good riddance.

          "the debugger doesn't tell me anything because this code compiles just fine" - random QA comment "Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst "I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle

          1 Reply Last reply
          0
          • H honey the codewitch

            Says the guy that created an account specifically to whine. Pardon me for saying so, but you don't seem very bright. Maybe you're just having an off day. Unemployment will do that.

            Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #13

            honey the codewitch wrote:

            Says the guy that created an account specifically to whine.

            Myself I just figured that person was not brave enough to use their real handle.

            H 1 Reply Last reply
            0
            • H honey the codewitch

              I'm dying for code generator ideas to leverage my improved Slang/Deslang technology. I've written enough parsers and lexer generators by now. Does Microsoft already produce a JSON entity framework type thing that gives you typed access to JSON data? Edit: NVM, I finally found one. Microsoft didn't write it, but it's much more ambitious than anything I'd come up with. Any other ideas?

              Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #14

              honey the codewitch wrote:

              Does Microsoft already produce a JSON entity framework type thing that gives you typed access to JSON data? Edit: NVM, I finally found one. Microsoft didn't write it, but it's much more ambitious than anything I'd come up with.

              Rather curious about that. Transmitting data over the wire guarantees that there is no type. Because of course type is really an artificial construct that is enforced by code (compiler, loader, etc.) One can create data constructs that add type. For example (not a viable one but good enough.)

              "type": "int",
              "DValue1": "13"
              "type": "string",
              "DValue2": "xxx"

              But is has the same problem if one doesn't do it in that the 'type' itself might not be known at the other end. So what is the solution that you found?

              H 1 Reply Last reply
              0
              • J jschell

                honey the codewitch wrote:

                Does Microsoft already produce a JSON entity framework type thing that gives you typed access to JSON data? Edit: NVM, I finally found one. Microsoft didn't write it, but it's much more ambitious than anything I'd come up with.

                Rather curious about that. Transmitting data over the wire guarantees that there is no type. Because of course type is really an artificial construct that is enforced by code (compiler, loader, etc.) One can create data constructs that add type. For example (not a viable one but good enough.)

                "type": "int",
                "DValue1": "13"
                "type": "string",
                "DValue2": "xxx"

                But is has the same problem if one doesn't do it in that the 'type' itself might not be known at the other end. So what is the solution that you found?

                H Offline
                H Offline
                honey the codewitch
                wrote on last edited by
                #15

                JSON Schema, like XML Schema allows you send something like type information over the wire. Like XML Schema it operates and validates in lexical space rather than value space, but it's good enough to impose "typed" validation on one's data. But even if you didn't send it, creating hard typed JSON entity objects on say, the C# receiving end allows you to validate that JSON that came from the wire, and apply strict typing to it via the properties on the generated entity objects. TL;DR version: The solution is similar to XML.

                Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                J 1 Reply Last reply
                0
                • J jschell

                  honey the codewitch wrote:

                  Says the guy that created an account specifically to whine.

                  Myself I just figured that person was not brave enough to use their real handle.

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #16

                  I figure if on a Monday - regular or not - if he has time to be creating new accounts and posting on codeproject just to complain about someone he probably doesn't have anything more productive to do - on a Monday.

                  Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                  J 1 Reply Last reply
                  0
                  • M Member 16144377

                    Lets be honest here, you are always whinging about something, or, it's 'look at me, look what i'm doing, aren't I wonderful!' It gets very tedious. Go back and look through your posts and tell me where you're not whinging or self gradiosing.

                    A Offline
                    A Offline
                    Alister Morton
                    wrote on last edited by
                    #17

                    WTH is gradiosing?

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      JSON Schema, like XML Schema allows you send something like type information over the wire. Like XML Schema it operates and validates in lexical space rather than value space, but it's good enough to impose "typed" validation on one's data. But even if you didn't send it, creating hard typed JSON entity objects on say, the C# receiving end allows you to validate that JSON that came from the wire, and apply strict typing to it via the properties on the generated entity objects. TL;DR version: The solution is similar to XML.

                      Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                      J Offline
                      J Offline
                      jschell
                      wrote on last edited by
                      #18

                      honey the codewitch wrote:

                      I finally found one.

                      You said that so I was hoping you would post the link.

                      honey the codewitch wrote:

                      receiving end allows you to validate that JSON

                      Ok but of course any deserialization for any message type is going to apply some validation. And myself I would likely code some other validation myself. Before using any other validation I am also going to want to see what a failure looks like. I know XML failures can be miserable to figure out until one has seen enough of them to know what to look for. And then there are microservices where one cannot just drop the message on the floor because of a validation error. So one needs to be sure an intercept is possible.

                      H 1 Reply Last reply
                      0
                      • J jschell

                        honey the codewitch wrote:

                        I finally found one.

                        You said that so I was hoping you would post the link.

                        honey the codewitch wrote:

                        receiving end allows you to validate that JSON

                        Ok but of course any deserialization for any message type is going to apply some validation. And myself I would likely code some other validation myself. Before using any other validation I am also going to want to see what a failure looks like. I know XML failures can be miserable to figure out until one has seen enough of them to know what to look for. And then there are microservices where one cannot just drop the message on the floor because of a validation error. So one needs to be sure an intercept is possible.

                        H Offline
                        H Offline
                        honey the codewitch
                        wrote on last edited by
                        #19

                        Providing an entity layer on top would facilitate mitigating your concerns. As far as the link: GitHub - gregsdennis/json-everything: System.Text.Json-based support for all of your JSON needs.[^]

                        Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                        1 Reply Last reply
                        0
                        • H honey the codewitch

                          I figure if on a Monday - regular or not - if he has time to be creating new accounts and posting on codeproject just to complain about someone he probably doesn't have anything more productive to do - on a Monday.

                          Check out my IoT graphics library here: https://honeythecodewitch.com/gfx And my IoT UI/User Experience library here: https://honeythecodewitch.com/uix

                          J Offline
                          J Offline
                          jschell
                          wrote on last edited by
                          #20

                          lol...ok. But it is Turkey week so maybe the person has the week off (probably where they just phone it in anyways.)

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups