Implement #50
diff --git a/release-notes/VERSION b/release-notes/VERSION
index 623d53a..5285297 100644
--- a/release-notes/VERSION
+++ b/release-notes/VERSION
@@ -16,6 +16,7 @@
#47: Add `@JsonCreator.mode` property to explicitly choose between delegating- and property-based creators
#48: Allow `@JsonView` for (method) parameters too
#49: Add `@JsonTypeInfo.skipWritingDefault`
+#50: Add `ObjectIdGenerator.maySerializeAsObject()` to support JSOG
- Added `@JsonInclude.content` to allow specifying inclusion criteria
for `java.util.Map` entries separate from inclusion of `Map` values
themselves
diff --git a/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java
index b426562..8f458e0 100644
--- a/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java
+++ b/src/main/java/com/fasterxml/jackson/annotation/ObjectIdGenerator.java
@@ -30,7 +30,25 @@
* @return True if this instance can be used as-is; false if not
*/
public abstract boolean canUseFor(ObjectIdGenerator<?> gen);
-
+
+ /**
+ * Accessor that needs to be overridden to return <code>true</code>
+ * if the Object Id may be serialized as JSON Object; used by, for example,
+ * JSOG handling.
+ * The reason accessor is needed is because handling such Object Ids is
+ * more complex and may incur additional buffering or performance overhead,
+ * avoiding of which makes sense for common case of scalar object ids
+ * (or native object ids some formats support).
+ *<p>
+ * Default implementation returns <code>false</code>, so needs to be overridden
+ * by Object-producing generators.
+ *
+ * @since 2.5
+ */
+ public boolean maySerializeAsObject() {
+ return false;
+ }
+
/*
/**********************************************************
/* Factory methods