Can current density $J$ for a thin wire by written in terms of the current $I$ and Dirac delta function? If there is a thin wire with current $I$ flowing through it, could I write the current density at all points in space of a horizontal 2D slice of the wire as $I \cdot \delta^2(\vec r)$ ?

I'm a bit new to the idea of the Dirac delta function, but as I understand, it can be used to model point sources. The area under the curve of the function is always 1. I'm not sure how to write it in 2-Dimensions so i'll write it as $\delta^2(\vec{r})$ where $\vec r$ is a 2D point in space.
Relationship between current & current density:
$$\iint_A{J\cdot dA}=I$$
Volume under the Dirac delta function is 1:
$$\iint_A I\cdot\delta^2(\vec r)\cdot dA=I\iint_A\delta^2(\vec r)\cdot dA=I$$
Setting the two equal to each other:
$$\iint_A{J\cdot dA}=\iint_A I\cdot\delta^2(\vec r)\cdot dA$$
$$J=I\cdot\delta^2 (\vec r)$$
Is this logic correct? The equality seems to work for calculating the $B$-Field around a long thin wire using Ampere's Law but I'm not sure if the math behind it is correct or if I'm just getting the right result by misunderstanding the math.
 A: I am also trying to define a current density with delta function for a filament, wondering if it is correct. The definition is
$$ \vec{j} =  \frac{I}{\pi} \cdot \frac{\delta(\rho)}{\rho}\cdot \vec{e_z} $$
where $\rho$ is a radius in cylindrical coordinates. Thus if we calculate the current, it is
$$ current = \int \vec{j}d\vec{S} = \int 2\pi I \cdot \frac{\delta(\rho)}{\rho}\cdot \vec{e_z} \cdot d\vec{S} $$
where the surface element is equal to
$$ d\vec{S}=\vec{e_z}\rho d\rho d\phi $$
thus the current is equal to
$$ \int \frac{I}{\pi} \cdot \frac{\delta(\rho)}{\rho}\cdot \vec{e_z} \cdot \vec{e_z}\rho d\rho d\phi = \frac{I}{\pi} \int_{0}^{\infty} \delta(\rho) d\rho \int_{0}^{2\pi}d\phi =  \frac{I}{\pi}\frac{1}{2}2\pi=I $$
So it gives a proper current after integration
A: How to determine if a given charge and current density function satisfy continuity equation?
The general current density function is more complex  what you have done only works for a straight wire located at x,y=0,0
A: You are thinking in the right direction,
although it is not quite clear what $\delta^2(\vec{r})$
exactly means.
The current density of a current $I$ through a thin wire
flowing along the $z$-axis can be written as
$$\vec{J}(\vec{r})=I\delta(x)\delta(y) \vec{e}_z$$
where $\vec{e}_z$ is the unit vector in $z$-direction.
You can check this by verifying
$$\iint_A\vec{J}\cdot d\vec{A}=\begin{cases}
I \quad\text{ , if the area $A$ includes the point $(x,y)=(0,0)$} \\
0 \quad\text{ , if the area $A$ doesn't include the point $(x,y)=(0,0)$}
\end{cases}$$
