Class OrganizationalChoiceSerializer

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<OrganizationalChoice>
org.cyclonedx.util.serializer.OrganizationalChoiceSerializer
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable

public class OrganizationalChoiceSerializer extends com.fasterxml.jackson.databind.JsonSerializer<OrganizationalChoice>
Serializer for OrganizationalChoice in patent contexts where the JSON schema uses unwrapped format (direct entity/contact/string ref) rather than the Licensing wrapped format ({"organization": {...}} / {"individual": {...}}).

JSON output:

  • Org with only bomRef: string "org-acme-inc"
  • Org with other fields: direct entity object {"name": "...", "url": [...]}
  • Individual: direct contact object {"name": "...", "email": "..."}

XML output (inside the parent element like <asserter> or <patentAssignee>):

  • Org with only bomRef: <ref>bomRef</ref>
  • Org with other fields: <organization>...</organization>
  • Individual: <individual>...</individual>
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    serialize(OrganizationalChoice value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider)
     

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    acceptJsonFormatVisitor, getDelegatee, handledType, isEmpty, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, serializeWithType, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OrganizationalChoiceSerializer

      public OrganizationalChoiceSerializer()
    • OrganizationalChoiceSerializer

      public OrganizationalChoiceSerializer(Version version)
  • Method Details

    • serialize

      public void serialize(OrganizationalChoice value, com.fasterxml.jackson.core.JsonGenerator gen, com.fasterxml.jackson.databind.SerializerProvider provider) throws IOException
      Specified by:
      serialize in class com.fasterxml.jackson.databind.JsonSerializer<OrganizationalChoice>
      Throws:
      IOException