Skip to content

Add avaje-nima page #79

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions _layout/base-nima.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<html>
<head>
<meta name="layout" content="_layout/b2.html"/>
<meta name="bread0" content="avaje" href="/"/>
<meta name="bread1" content="nima" href="/nima"/>
<template id="menuNav"><#include "/_nima/_nav.ftl"></template>
<var id="gitsource">https://github.com/avaje/avaje-nima</var>
</head>
<body data-theme="light">
<div class="container">
<aside id="sidenav">
<nav class="side scroll">
$menuNav
</nav>
</aside>
<article id="main-content">
<header>
<nav id="top">
<div class="breadcrumb">$breadcrumb</div>
<ul>
<li><a href="/" title="home"><i class="fas fa-home"></i></a></li>
<li><a href="https://discord.gg/Qcqf9R27BR" title="discord server"><i class="fab fa-discord"></i></a></li>
<li><a href="$gitsource" title="github source"><i class="fab fa-github"></i></a></li>
<li><a onclick="toggleTheme();" title="switch dark light theme"><i class="fas fa-adjust"></i></a></li>
</ul>
</nav>
</header>
<div id="layout-body"></div>
</article>
</div>
</body>
</html>
6 changes: 6 additions & 0 deletions _nima/_nav.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<ul>
<@nav url="#overview" title="Overview"/>
<@nav url="#quick-start" title="Quick Start"/>

</ul>
<p>&nbsp;</p>
52 changes: 26 additions & 26 deletions jsonb/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,32 +70,32 @@ <h4>
1. Add <em>avaje-jsonb</em> dependencies.
</h4>
<pre content="xml">
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb</artifactId>
<version>${avaje.jsonb.version}</version>
</dependency>
<!-- if using spring web, add the below to use jsonb for http messaging -->
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb-spring-starter</artifactId>
<version>${avaje.jsonb.version}</version>
</dependency>
</pre>
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb</artifactId>
<version>${avaje.jsonb.version}</version>
</dependency>
<!-- if using spring web, add the below to use jsonb for http messaging -->
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb-spring-starter</artifactId>
<version>${avaje.jsonb.version}</version>
</dependency>
</pre>

<h4>
2. Add the annotation processor to your pom.
</h4>
<pre content="xml">
<!-- Annotation processors -->
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb-generator</artifactId>
<version>${avaje.jsonb.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</pre>
<!-- Annotation processors -->
<dependency>
<groupId>io.avaje</groupId>
<artifactId>avaje-jsonb-generator</artifactId>
<version>${avaje.jsonb.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</pre>

<h4>2a. JDK 23+ </h4>

Expand Down Expand Up @@ -142,10 +142,10 @@ <h4>
// build using defaults
Jsonb jsonb = Jsonb.builder().build();

JsonType<Customer> customerType = jsonb.type(Customer.class);
JsonType<|Customer> customerType = jsonb.type(Customer.class);

// If the type is generic we can specify
// JsonType<Customer<T1,T2,...>> customerType = jsonb.type(Types.newParameterizedType(Customer.class, T1.class,T2.class, ...);
// JsonType<|Customer<|T1,T2,...>> customerType = jsonb.type(Types.newParameterizedType(Customer.class, T1.class,T2.class, ...);

Customer customer = ...;

Expand All @@ -165,14 +165,14 @@ <h4>
<pre content="java">
Jsonb jsonb = Jsonb.builder().build();

JsonType<Customer> customerType = jsonb.type(Customer.class);
JsonType<|Customer> customerType = jsonb.type(Customer.class);

// only including the id and name
JsonView<Customer> idAndNameView = customerType.view("(id, name)");
JsonView<|Customer> idAndNameView = customerType.view("(id, name)");

String asJson = idAndNameView.toJson(customer);

JsonView<Customer> myView =
JsonView<|Customer> myView =
customerType.view("(id, name, billingAddress(*), contacts(lastName, email))");

// serialize to json the above specified properties only
Expand Down
Loading